#support

Troubleshooting Docker File Configuration for Metrics Traces

TLDR Vibhav was trying to pass config in a Docker file and encountered issues with metrics traces not getting pushed. Prashant offered reference, and Srikanth identified potential grpc exporter issue.

Powered by Struct AI
Jul 18, 2023 (2 months ago)
Vibhav
Photo of md5-4061b9efb113c4b0e5c512b8c74cca5f
Vibhav
08:30 AM
How do we pass this in the docker file? OTEL_RESOURCE_ATTRIBUTES=service.name=productpage OTEL_EXPORTER_OTLP_ENDPOINT=http://xx.xx.xx.xx:4318 opentelemetry-instrument --traces_exporter otlp_proto_http --metrics_exporter otlp_proto_http python3 productpage.py 9080
Prashant
Photo of md5-1899629483c7ab1dccfbee6cc2f637b9
Prashant
09:49 AM
You can refer to this sample flask app example:

https://github.com/SigNoz/sample-flask-app/blob/master/Dockerfile
Vibhav
Photo of md5-4061b9efb113c4b0e5c512b8c74cca5f
Vibhav
10:26 AM
I am able to generate trace by metrics traces not getting pushed
10:26
Vibhav
10:26 AM
{
"name": "/",
"context": {
"trace_id": "0x1070ede6e4d6c97afce24d2492ceef46",
"span_id": "0x40b2fe5abc5fc783",
"trace_state": "[]"
},
"kind": "SpanKind.SERVER",
"parent_id": null,
"start_time": "2023-07-18T10:22:44.545395Z",
"end_time": "2023-07-18T10:22:44.547657Z",
"status": {
"status_code": "UNSET"
},
"attributes": {
"http.method": "GET",
"http.server_name": "::",
"http.scheme": "http",
"net.host.port": 9080,
"http.host": "localhost:9080",
"http.target": "/",
"net.peer.ip": "::ffff:127.0.0.1",
"http.user_agent": "curl/7.64.0",
"net.peer.port": 49024,
"http.flavor": "1.1",
"http.route": "/",
"http.status_code": 200
},
10:26
Vibhav
10:26 AM
My backend is reachable : Escape character is '^]'.
10:29
Vibhav
10:29 AM
WARNING:opentelemetry.exporter.otlp.proto.grpc.exporter:Transient error StatusCode.UNAVAILABLE encountered while exporting metrics to localhost:4317, retrying in 1s.
WARNING:opentelemetry.exporter.otlp.proto.grpc.exporter:Transient error StatusCode.UNAVAILABLE encountered while exporting metrics to localhost:4317, retrying in 2s.
WARNING:opentelemetry.exporter.otlp.proto.grpc.exporter:Transient error StatusCode.UNAVAILABLE encountered while exporting metrics to localhost:4317, retrying in 4s.
12:11
Vibhav
12:11 PM
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): signoz-otlp-:4318
send: b'POST /v1/metrics HTTP/1.1\r\nHost: signoz-otlp:4318\r\nUser-Agent: python-requests/2.31.0\r\nAccept-Encoding: gzip, deflate\r\nAccept: /\r\nConnection: keep-alive\r\nContent-Type: application/x-protobuf\r\nContent-Length: 183\r\n\r\n'
send: b'\n\xb4\x01\n\xb1\x01\n"\n\x16telemetry.sdk.language\x12\x08\n\x06python\n%\n\x12telemetry.sdk.name\x12\x0f\n\ropentelemetry\n!\n\x15telemetry.sdk.version\x12\x08\n\x061.19.0\n\x1d\n\x0cservice.name\x12\r\n\x0bproductpage\n"\n\x16telemetry.auto.version\x12\x08\n\x060.40b0'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/x-protobuf
header: Date: Tue, 18 Jul 2023 12:08:09 GMT
header: Content-Length: 2
DEBUG:urllib3.connectionpool:http://signoz-otlp:4318 "POST /v1/metrics HTTP/1.1" 200 2. Getting 200 reponse but unable to see the app in the backend
Prashant
Photo of md5-1899629483c7ab1dccfbee6cc2f637b9
Prashant
03:37 PM
Srikanth can you please look into this?
Jul 19, 2023 (2 months ago)
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
01:02 AM
It seems you are setting grpc exporter somewhere already and --traces_exporter is not effective for that reason.