Skip to content

Commit

Permalink
add OTEL_PYTHON_ENABLE_SERVER_ATTRIBUTES_FOR_REQUEST_DURATION flag to…
Browse files Browse the repository at this point in the history
… add server.address and server.port for http.server.request.duration
  • Loading branch information
zeitlinger committed Jun 20, 2024
1 parent 0199d61 commit 2f53be4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def setUp(self):
"os.environ",
{
"OTEL_PYTHON_FLASK_EXCLUDED_URLS": "http://localhost/env_excluded_arg/123,env_excluded_noarg",
"OTEL_ENABLE_SERVER_ATTRIBUTES_FOR_REQUEST_DURATION": "true",
"OTEL_PYTHON_ENABLE_SERVER_ATTRIBUTES_FOR_REQUEST_DURATION": "true",
OTEL_SEMCONV_STABILITY_OPT_IN: sem_conv_mode,
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def _parse_duration_attrs(
req_attrs,
_server_duration_attrs_old,
_server_duration_attrs_new_with_server_attributes
if os.environ.get("OTEL_ENABLE_SERVER_ATTRIBUTES_FOR_REQUEST_DURATION")
if os.environ.get("OTEL_PYTHON_ENABLE_SERVER_ATTRIBUTES_FOR_REQUEST_DURATION")
else _server_duration_attrs_new,
sem_conv_opt_in_mode,
)
Expand Down

0 comments on commit 2f53be4

Please sign in to comment.