You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-23Lines changed: 22 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -280,43 +280,42 @@ OpenTelemetry (OTEL)
280
280
281
281
Read more about OpenTelemetry in Python [here](https://opentelemetry.io/docs/instrumentation/python/)
282
282
283
-
### Quick-start
284
-
The following shows an example of setting up [jaegertracing](https://www.jaegertracing.io/docs/1.50/deployment/#all-in-one) via docker and executing a simple python script that implements the Synapse Python client.
283
+
### Exporting Synapse Client Traces to SigNoz Cloud for developers
285
284
286
-
#### Running the jaeger docker container
287
-
Start a docker container with the following options:
288
-
```
289
-
docker run --name jaeger \
290
-
-e COLLECTOR_OTLP_ENABLED=true \
291
-
-p 16686:16686 \
292
-
-p 4318:4318 \
293
-
jaegertracing/all-in-one:latest
294
-
```
295
-
Explanation of ports:
296
-
*`4318` HTTP port for OTLP data collection
297
-
*`16686` Jaeger UI for visualizing traces
298
-
299
-
Once the docker container is running you can access the Jaeger UI via: `http://localhost:16686`
285
+
#### Prerequisites
286
+
1. Create an account and obtain access to Signoz Cloud.
287
+
2. Create an ingestion key by following the step [here](https://signoz.io/docs/ingestion/signoz-cloud/keys/).
300
288
301
289
#### Environment Variable Configuration
302
-
303
-
By default, the OTEL exporter sends trace data to `http://localhost:4318/v1/traces`. You can customize the behavior through environment variables:
304
-
305
-
*`OTEL_SERVICE_NAME`: Defines a unique identifier for your application or service in telemetry data (defaults to 'synapseclient'). Set this to a descriptive name that represents your specific implementation, making it easier to filter and analyze traces in your monitoring system.
306
-
*`OTEL_EXPORTER_OTLP_ENDPOINT`: Specifies the destination URL for sending telemetry data (defaults to 'http://localhost:4318'). Configure this to direct data to your preferred OpenTelemetry collector or monitoring service.
290
+
The following environment variables are required to be set:
Explanation of both required and optional environment variables:
296
+
##### Required
297
+
*`OTEL_EXPORTER_OTLP_ENDPOINT`: The OTLP endpoint to which telemetry is exported.
298
+
*`OTEL_EXPORTER_OTLP_HEADERS`: Authentication/metadata for exports (e.g., API keys, tokens). For SigNoz, use `signoz-ingestion-key=<key>`.
299
+
300
+
##### Optional
301
+
*`OTEL_SERVICE_NAME`: Unique identifier for your app/service in telemetry data (defaults to synapseclient). Use a descriptive name so you can easily filter and analyze traces per service.
307
302
*`OTEL_DEBUG_CONSOLE`: Controls local visibility of telemetry data. Set to 'true' to output trace information to the console, which is useful for development and troubleshooting without an external collector.
308
303
*`OTEL_SERVICE_INSTANCE_ID`: Distinguishes between multiple instances of the same service (e.g., 'prod', 'development', 'local'). This helps identify which specific deployment or environment generated particular traces.
309
-
*`OTEL_EXPORTER_OTLP_HEADERS`: Configures authentication and metadata for telemetry exports. Use this to add API keys, authentication tokens, or custom metadata when sending traces to secured collectors or third-party monitoring services.
310
-
311
304
312
305
#### Enabling OpenTelemetry in your code
306
+
You can copy `.env.example` file to `.env` and fill in the values as needed
307
+
313
308
To enable OpenTelemetry with the Synapse Python client, simply call the
314
309
`enable_open_telemetry()` method on the Synapse class. Additionally you can access an
315
310
instance of the OpenTelemetry tracer via the `get_tracer()` call. This will allow you
0 commit comments