Skip to content

Commit

Permalink
fix: opentelemetry warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mplemay committed Jan 2, 2025
1 parent ac46dd6 commit e2b3ae7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/http/httpx/kiota_http/httpx_request_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,12 +601,14 @@ def get_request_from_request_information(

otel_attributes = {
HTTP_REQUEST_METHOD: method.value,
"http.port": url.port,
SERVER_ADDRESS: url.hostname,
URL_SCHEME: url.scheme,
"url.uri_template": request_info.url_template,
}

if url.port is not None:
otel_attributes["http.port"] = url.port

if self.observability_options.include_euii_attributes:
otel_attributes.update({URL_FULL: url.geturl()})

Expand Down

0 comments on commit e2b3ae7

Please sign in to comment.