-
Notifications
You must be signed in to change notification settings - Fork 607
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
Implement new HTTP semantic convention opt-in for Falcon #2790
base: main
Are you sure you want to change the base?
Implement new HTTP semantic convention opt-in for Falcon #2790
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.
A big thanks for working on this one. Just some comments
@@ -66,6 +70,7 @@ def setUp(self): | |||
{ | |||
"OTEL_PYTHON_FALCON_EXCLUDED_URLS": "ping", | |||
"OTEL_PYTHON_FALCON_TRACED_REQUEST_ATTRS": "query_string", | |||
"OTEL_SEMCONV_STABILITY_OPT_IN": "http/dup", |
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 we missing the tests for "http" and "default"?
@@ -243,6 +251,11 @@ class _InstrumentedFalconAPI(getattr(falcon, _instrument_app)): | |||
def __init__(self, *args, **kwargs): | |||
otel_opts = kwargs.pop("_otel_opts", {}) | |||
|
|||
_OpenTelemetrySemanticConventionStability._initialize() |
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 think we are missing some important points here:
Checklist
- Add semconv status as
migration
for falcon in instrumentations README - Populate
{method}
asHTTP
when nonstandard method (sanitize_method) - set request HTTP method attribute as
_OTHER
when nonstandard http method and for new semconv also sethttp.request.method_original
with the original nonstandard method. - Set schema_url based on the opt-in mode
- Create histograms based on the opt-in mode (different metric names so no dup attributes)
- Set metrics attributes based on the opt-in mode
- Set span attributes based on the opt-in mode
- Tests for new_semconv, both_semconv and default
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.
Thank you for the great feedback, I'll get started on this.
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
- `opentelemetry-instrumentation-kafka-python` Instrument temporary fork, kafka-python-ng | |||
inside kafka-python's instrumentation | |||
([#2537](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2537))) | |||
- `opentelemetry-instrumentation-falcon` Implement new HTTP semantic convention opt-in for Falcon |
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.
- `opentelemetry-instrumentation-falcon` Implement new HTTP semantic convention opt-in for Falcon | |
- `opentelemetry-instrumentation-falcon` Implement new HTTP semantic convention opt-in for Falcon | |
([#2790](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2790)) |
Description
This change updates the falcon instrumentor to adhere to the new HTTP semantic conventions, according to the migration plan outlined here:
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Updated the tests to assert that the new span and duration attributes have been added.