Slackbot
08/30/2022, 8:14 AMAshijit Pramanik
08/31/2022, 7:46 AM❯ OTEL_RESOURCE_ATTRIBUTES=service.name=pythonApp OTEL_EXPORTER_OTLP_ENDPOINT="<http://example.com:4317>" opentelemetry-instrument python3 app.py
Srikanth Chekuri
08/31/2022, 12:01 PMOTEL_EXPORTER_OTLP_ENDPOINT="<http://example.com:4317>"
? Did you meant localhost instead of example.com?Ashijit Pramanik
08/31/2022, 12:02 PMSrikanth Chekuri
08/31/2022, 12:03 PMAshijit Pramanik
08/31/2022, 12:03 PMSrikanth Chekuri
08/31/2022, 12:04 PMAshijit Pramanik
08/31/2022, 12:36 PMtroubleshoot
tool seems to have access.
2022-08-31T17:45:55.293+0530 INFO workspace/main.go:28 STARTING!
2022-08-31T17:45:55.293+0530 INFO checkEndpoint/checkEndpoint.go:41 checking reachability of SigNoz endpoint
2022-08-31T17:45:55.405+0530 INFO workspace/main.go:46 Successfully sent sample data to signoz ...
I noticed that the flask traces are being sent now, though these exceptions also show sometimes -
❯ OTEL_RESOURCE_ATTRIBUTES=service.name=pythonApp OTEL_EXPORTER_OTLP_ENDPOINT="<http://example.com:4317>" opentelemetry-instrument python3 app.py
127.0.0.1 - - [31/Aug/2022 13:13:02] "POST /action HTTP/1.1" 500 -
127.0.0.1 - - [31/Aug/2022 13:13:04] "GET /completed HTTP/1.1" 200 -
127.0.0.1 - - [31/Aug/2022 13:13:04] "GET /static/assets/style.css HTTP/1.1" 304 -
127.0.0.1 - - [31/Aug/2022 13:13:04] "GET /static/assets/emoji.css HTTP/1.1" 304 -
127.0.0.1 - - [31/Aug/2022 13:13:04] "GET /static/assets/twemoji.min.js HTTP/1.1" 304 -
127.0.0.1 - - [31/Aug/2022 13:13:04] "GET /static/assets/emoji.js HTTP/1.1" 304 -
127.0.0.1 - - [31/Aug/2022 13:13:06] "GET /list HTTP/1.1" 500 -
127.0.0.1 - - [31/Aug/2022 13:13:06] "GET /static/assets/style.css HTTP/1.1" 304 -
127.0.0.1 - - [31/Aug/2022 13:13:06] "GET /static/assets/emoji.css HTTP/1.1" 304 -
127.0.0.1 - - [31/Aug/2022 13:13:06] "GET /static/assets/twemoji.min.js HTTP/1.1" 304 -
127.0.0.1 - - [31/Aug/2022 13:13:06] "GET /static/assets/emoji.js HTTP/1.1" 304 -
Transient error StatusCode.UNAVAILABLE encountered while exporting metrics, retrying in Nones.
Exception while exporting metrics an integer is required (got type NoneType)
Traceback (most recent call last):
File "/Users/username/Downloads/test_apm/simple_server/lib/python3.9/site-packages/opentelemetry/exporter/otlp/proto/grpc/exporter.py", line 305, in _export
self._client.Export(
File "/Users/username/Downloads/test_apm/simple_server/lib/python3.9/site-packages/grpc/_channel.py", line 946, in __call__
return _end_unary_response_blocking(state, call, False, None)
File "/Users/username/Downloads/test_apm/simple_server/lib/python3.9/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "Connection reset by peer"
debug_error_string = "{"created":"@1661938573.017058000","description":"Error received from peer ipv4:<ip-address-here>:4317","file":"src/core/lib/surface/call.cc","file_line":967,"grpc_message":"Connection reset by peer","grpc_status":14}"
>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/username/Downloads/test_apm/simple_server/lib/python3.9/site-packages/opentelemetry/sdk/metrics/_internal/export/__init__.py", line 482, in _receive_metrics
self._exporter.export(metrics_data, timeout_millis=timeout_millis)
File "/Users/username/Downloads/test_apm/simple_server/lib/python3.9/site-packages/opentelemetry/exporter/otlp/proto/grpc/metric_exporter/__init__.py", line 248, in export
return self._export(metrics_data)
File "/Users/username/Downloads/test_apm/simple_server/lib/python3.9/site-packages/opentelemetry/exporter/otlp/proto/grpc/exporter.py", line 345, in _export
sleep(delay)
TypeError: an integer is required (got type NoneType)
Ashijit Pramanik
08/31/2022, 12:37 PM❯ OTEL_RESOURCE_ATTRIBUTES=service.name=TestApm OTEL_EXPORTER_OTLP_ENDPOINT="<http://example.com:4317>" opentelemetry-instrument python3 simple_server.py 7000 127.0.0.1
HTTP Server Running...........
addrecord one: {'var1': ['value1'], 'var2': ['value2']}
127.0.0.1 - - [31/Aug/2022 17:55:47] "POST /api/v1/addrecord/one HTTP/1.1" 200 -
addrecord two: {'var1': ['value1'], 'var2': ['value2'], 'var3': ['value3']}
127.0.0.1 - - [31/Aug/2022 17:55:50] "POST /api/v1/addrecord/two HTTP/1.1" 200 -
127.0.0.1 - - [31/Aug/2022 17:55:54] "GET /api/v1/getrecord/one HTTP/1.1" 200 -
getrecord one: {"var1": ["value1"], "var2": ["value2"]}
Srikanth Chekuri
08/31/2022, 12:39 PMWhat does this do? Does it have some reload mechanism? OTEL It has issues reloader so make sure to disable if that's enabled.Copy codepython3 simple_server.py 7000 127.0.0.1
Ashijit Pramanik
08/31/2022, 12:40 PMSrikanth Chekuri
08/31/2022, 12:42 PMAshijit Pramanik
08/31/2022, 12:53 PM