Skip to content

Tracing: Make span name to be egress host_header, e.g., egress api#631

Merged
RomanDzhabarov merged 5 commits intomasterfrom
better_operation
Mar 27, 2017
Merged

Tracing: Make span name to be egress host_header, e.g., egress api#631
RomanDzhabarov merged 5 commits intomasterfrom
better_operation

Conversation

@RomanDzhabarov
Copy link
Copy Markdown
Member

@RomanDzhabarov RomanDzhabarov commented Mar 27, 2017

@lyft/network-team

@RomanDzhabarov RomanDzhabarov changed the title Make span name to be egress host_header, e.g., egress api Tracing: Make span name to be egress host_header, e.g., egress api Mar 27, 2017
SpanPtr HttpTracerImpl::startSpan(const Config& config, Http::HeaderMap& request_headers,
const Http::AccessLog::RequestInfo& request_info) {
std::string operation_name = config.operationName();
if (request_headers.Host()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requests must have host header.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, right, it's checked in the same decode headers

LocalInfo::MockLocalInfo local_info;
SystemTime time;
Http::AccessLog::MockRequestInfo request_info;
EXPECT_CALL(request_info, startTime()).WillOnce(Return(time));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be part of the default mock via ON_CALL, can you add this to default mock and clean this up elsewhere in this file.


SpanPtr HttpTracerImpl::startSpan(const Config& config, Http::HeaderMap& request_headers,
const Http::AccessLog::RequestInfo& request_info) {
std::string operation_name =
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fmt::format is kind of slow. Can we just do direct string operations here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

class HttpTracerImplTest : public Test {
public:
HttpTracerImplTest() {
ON_CALL(request_info_, startTime()).WillByDefault(Return(start_time_));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go directly in the request_info_ mock. It doesn't need to be here.


MOCK_CONST_METHOD0(operationName, const std::string&());

const std::string operation_name_ = "operation";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someone might want to change this. I would make this non-const.

@RomanDzhabarov RomanDzhabarov merged commit bc66960 into master Mar 27, 2017
@RomanDzhabarov RomanDzhabarov deleted the better_operation branch March 30, 2017 03:42
wolfguoliang pushed a commit to wolfguoliang/envoy that referenced this pull request Jan 23, 2021
jpsim pushed a commit that referenced this pull request Nov 28, 2022
Description: updating the envoy ref again and the absolute binary size per #447.
Risk Level: low
Testing: CI

Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
Description: updating the envoy ref again and the absolute binary size per #447.
Risk Level: low
Testing: CI

Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
mathetake pushed a commit that referenced this pull request Mar 3, 2026
**Commit Message**

Capabilities docs explaining upstream auth, its purpose, and what it
does conceptually.
This is to help highlight a key capability of the Envoy AI Gateway that
is easy to overlook.

---------

Signed-off-by: Erica Hughberg <erica.sundberg.90@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants