Slackbot
10/26/2022, 7:47 PMAbhinav Ramana
10/26/2022, 7:49 PM# Should happen even before app starts
if ENABLE_OPENTELEMETRY:
os.environ["OTEL_EXPORTER_OTLP_TRACES_ENDPOINT"] = f"{OTEL_EXPORTER_OTLP_ENDPOINT}/v1/traces"
configure_opentelemetry(
service_name=OTEL_SERVICE_NAME,
# TODO : Somehow get the paint-task version and populate here to compare canary/staging versions
service_version="1.0.0",
span_exporter_endpoint=OTEL_EXPORTER_OTLP_ENDPOINT,
span_exporter_insecure=True # Allow everything within AWS
# Add log_level=debug here
)
I tried this and seemed to workAbhinav Ramana
10/26/2022, 7:50 PMAllan Li
10/26/2022, 7:51 PMAbhinav Ramana
10/26/2022, 7:51 PMconfigure_opentelemetry
you should be able to use this method right>Allan Li
10/26/2022, 7:54 PMAbhinav Ramana
10/26/2022, 7:59 PMSrikanth Chekuri
10/27/2022, 3:22 AMCan we set these inside of the code somehow instead of in the terminal? For example inside the config object ofYou can do this but you can’t use the auto instrumentation at the same time command if you want do this. Example here https://opentelemetry.io/docs/instrumentation/python/exporters/#otlp-endpoint-or-collector?OTLPTraceExporter
Srikanth Chekuri
10/27/2022, 3:23 AMdo I have to do special instrumentation for graphqlThere is no instrumentation library for graphql (yet). You would have to write some sort of middleware/wrapper or some manual instrumentation is needed.