Collecting Application Logs Using OTEL Python SDK

You can directly send logs of your application to SigNoz using the Python SDKs provided by opentlemetry. Please find an example here.

For SigNoz Cloud

For sending logs to SigNoz cloud, while running the above example set the below environment variables

  • The value of OTEL_EXPORTER_OTLP_ENDPOINT environment variable will be https://ingest.{region} where depending on the choice of your region for SigNoz cloud, the otlp endpoint will vary according to this table.

  • The value of OTEL_EXPORTER_OTLP_HEADERS environment variable will be signoz-access-token=<SIGNOZ_INGESTION_KEY> where <SIGNOZ_INGESTION_KEY> is your ingestion key

  • Your run command will look like

    OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.{region}" OTEL_EXPORTER_OTLP_HEADERS=signoz-access-token=<SIGNOZ_INGESTION_KEY> python3`
On this page