Open thpierce opened 8 months ago
I think specifically what I am asking is the following - can we something to the effect of:
if _report_old(sem_conv_opt_in_mode)
_set_http_net_peer_name(span_attributes, parsed_url.hostname, sem_conv_opt_in_mode)
_set_http_port(span_attributes, parsed_url.port, sem_conv_opt_in_mode)
Describe your environment
Steps to reproduce
sample.py
:requests.get('https://0.0.0.0:8443/some/path')
"net.peer.name": "0.0.0.0", "net.peer.name": "8443",
{ "resource_metrics": [ { "resource": { "attributes": { "telemetry.sdk.language": "python", "telemetry.sdk.name": "opentelemetry", "telemetry.sdk.version": "1.22.0", "service.name": "my_service", "telemetry.auto.version": "0.43b0" }, "schema_url": "" }, "scope_metrics": [ { "scope": { "name": "opentelemetry.instrumentation.requests", "version": "0.43b0", "schema_url": "https://opentelemetry.io/schemas/1.11.0" }, "metrics": [ { "name": "http.client.duration", "description": "measures the duration of the outbound HTTP request", "unit": "ms", "data": { "data_points": [ { "attributes": { "http.method": "GET", "http.scheme": "https", "http.host": "0.0.0.0", "net.peer.name": "0.0.0.0", "net.peer.port": 8443 }, ... } ], "aggregation_temporality": 2 } } ], "schema_url": "https://opentelemetry.io/schemas/1.11.0" } ], "schema_url": "" } ] } { "name": "GET", "context": { "trace_id": "0x7e5965f4350d2ff717908d358ee8e55a", "span_id": "0x20ef5ac593251efa", "trace_state": "[]" }, "kind": "SpanKind.CLIENT", "parent_id": null, "start_time": "2024-01-26T18:57:59.679256Z", "end_time": "2024-01-26T18:57:59.689908Z", "status": { "status_code": "ERROR", "description": "ConnectionError: HTTPSConnectionPool(host='0.0.0.0', port=8443): Max retries exceeded with url: /some/path (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x105958700>: Failed to establish a new connection: [Errno 61] Connection refused'))" }, "attributes": { "http.method": "GET", "http.url": "https://0.0.0.0:8443/some/path" }, "events": [ ... ], "links": [], "resource": { "attributes": { "telemetry.sdk.language": "python", "telemetry.sdk.name": "opentelemetry", "telemetry.sdk.version": "1.22.0", "service.name": "my_service", "telemetry.auto.version": "0.43b0" }, "schema_url": "" } }