How do we pass this in the docker file? OTEL_RESOU...
# support
v
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
p
You can refer to this sample flask app example: https://github.com/SigNoz/sample-flask-app/blob/master/Dockerfile
v
I am able to generate trace by metrics traces not getting pushed
{
"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
},
My backend is reachable : Escape character is '^]'.
WARNINGopentelemetry.exporter.otlp.proto.grpc.exporterTransient error StatusCode.UNAVAILABLE encountered while exporting metrics to localhost:4317, retrying in 1s. WARNINGopentelemetry.exporter.otlp.proto.grpc.exporterTransient error StatusCode.UNAVAILABLE encountered while exporting metrics to localhost:4317, retrying in 2s. WARNINGopentelemetry.exporter.otlp.proto.grpc.exporterTransient error StatusCode.UNAVAILABLE encountered while exporting metrics to localhost:4317, retrying in 4s.
DEBUGurllib3.connectionpoolStarting new HTTP connection (1): signoz-otlp-:4318 send: b'POST /v1/metrics HTTP/1.1\r\nHost: signoz-otlp4318\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 120809 GMT header: Content-Length: 2 DEBUGurllib3.connectionpoolhttp://signoz-otlp:4318 "POST /v1/metrics HTTP/1.1" 200 2. Getting 200 reponse but unable to see the app in the backend
p
@Srikanth Chekuri can you please look into this?
s
It seems you are setting grpc exporter somewhere already and --traces_exporter is not effective for that reason.