-
Notifications
You must be signed in to change notification settings - Fork 16
Update opentelemetry conventions #245
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
Conversation
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.
This will also need to be updated in elasticsearch-py:
f"db.elasticsearch.path_parts.{key}"
tof"db.operation.parameter.{key}"
Also some recommended stuff:
db.operation.batch.size
in bulk helpersdb.collection.name
if one path part is index?
We don't handle errors at all, and we likely should. It's required in the spec.
But this definitely fixes existing stuff, so thank you!
) -> None: | ||
if self.otel_span is None: | ||
return | ||
|
||
# url.full does not contain auth info which is passed as headers | ||
self.otel_span.set_attribute("url.full", base_url + target) | ||
self.otel_span.set_attribute("http.request.method", method) | ||
self.otel_span.set_attribute("server.address", host) | ||
self.otel_span.set_attribute("server.port", port) |
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.
Should this be added only if not 9200 for HTTP and 443 for HTTPS?
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.
I can actually remove the HTTP method from here since the client already adds it. Or better yet, I'll just leave it. This is exactly how the client adds it as well.
Added elastic/elasticsearch-py#2999 in the client with some of the updates you suggested. |
* update opentelemetry conventions * linter fixes * add response status codes * update requests URL for intersphinx (cherry picked from commit da5f360)
* update opentelemetry conventions * linter fixes * add response status codes * update requests URL for intersphinx (cherry picked from commit da5f360)
* update opentelemetry conventions * linter fixes * add response status codes * update requests URL for intersphinx (cherry picked from commit da5f360)
* update opentelemetry conventions * linter fixes * add response status codes * update requests URL for intersphinx (cherry picked from commit da5f360)
* update opentelemetry conventions * linter fixes * add response status codes * update requests URL for intersphinx (cherry picked from commit da5f360)
* update opentelemetry conventions * linter fixes * add response status codes * update requests URL for intersphinx (cherry picked from commit da5f360)
* update opentelemetry conventions * linter fixes * add response status codes * update requests URL for intersphinx (cherry picked from commit da5f360) Co-authored-by: Miguel Grinberg <[email protected]>
* update opentelemetry conventions * linter fixes * add response status codes * update requests URL for intersphinx (cherry picked from commit da5f360) Co-authored-by: Miguel Grinberg <[email protected]>
This change updates our OpenTelemetry conventions.