-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Httpd add possibility to configure custom attributes and resources #14
Httpd add possibility to configure custom attributes and resources #14
Conversation
@@ -32,4 +32,7 @@ OpenTelemetryPath /tmp/output-spans | |||
|
|||
# OpenTelemetryIgnoreInbound off | |||
|
|||
# OpenTelemetrySetResource service.name apache-web-server | |||
# OpenTelemetrySetAttribute foo bar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these attributes global, for all routes? Is it possible to set attributes for specific route?
With nginx it's possible to set these per server, route basis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment those are global settings.
@@ -85,8 +85,17 @@ void initTracer() | |||
processor = std::make_shared<sdktrace::SimpleSpanProcessor>(std::move(exporter)); | |||
} | |||
|
|||
opentelemetry::sdk::resource::ResourceAttributes resAttrs({{"service.name", "httpd"}}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the spec:
[1]: MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to u nknown_service: concatenated with process.executable.name, e.g. unknown_service:bash. If process.executable.name is not available, the value MUST be set to unknown_service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Thanks. Removed.
@@ -85,8 +85,17 @@ void initTracer() | |||
processor = std::make_shared<sdktrace::SimpleSpanProcessor>(std::move(exporter)); | |||
} | |||
|
|||
opentelemetry::sdk::resource::ResourceAttributes resAttrs({{"service.name", "httpd"}}); | |||
// add custom-configured resources | |||
for(auto &it:config.resources) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spacing?
@@ -54,6 +55,8 @@ struct OtelConfig | |||
// context propagation | |||
bool ignore_inbound; | |||
OtelPropagation propagation; | |||
std::unordered_map<std::string, std::string> attribiutes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed typo.
No description provided.