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
- Replace `<run_command>` with the command to run your application
486
+
- Set the `<region>` to match your SigNoz Cloud [region](https://signoz.io/docs/ingestion/signoz-cloud/overview/#endpoint)
487
+
- Replace `<your-ingestion-key>` with your SigNoz [ingestion key](https://signoz.io/docs/ingestion/signoz-cloud/keys/)
488
+
-`<service_name>` is name of your service
489
+
490
+
The above steps install OpenTelemetry dependencies directly inside the Docker container without altering `requirements.txt` file of project & sets environment variables to export the traces.
491
+
492
+
**Step 2.** Run your Docker container
493
+
494
+
Here's how you can run your docker container:
495
+
496
+
```bash
497
+
docker build -t <image-name>.&& docker run -d -p <host-port>:<container-port><image-name>
498
+
```
499
+
500
+
- Replace `<image-name>`, `<host-port>`, and `<container-port>` with values for your application.
501
+
502
+
-`-d` runs the container in detached mode
503
+
-`-p` maps a host port to a container port
504
+
505
+
506
+
**Step 3.** Validate if your application is sending traces to SigNoz cloud by following the instructions [here](#validating-instrumentation-by-checking-for-traces).
507
+
508
+
In case you encounter an issue where all applications do not get listed in the services section then please refer to the [troubleshooting section](#troubleshooting-your-signoz-installation).
509
+
510
+
---
511
+
512
+
#### Send traces via OTel Collector binary
513
+
514
+
**Step 1.** Configure OpenTelemetry to run in Docker Container
515
+
516
+
Add the following in your Dockerfile.
517
+
518
+
```bash
519
+
# install OpenTelemetry Collector in Docker container
520
+
FROM otel/opentelemetry-collector-contrib:0.131.0 AS otel
# Run app.py with OpenTelemetry instrumentation when the container launches
547
+
CMD sh -c "/otelcol-contrib --config=/etc/otelcol-contrib/config.yaml & opentelemetry-instrument <run_command>
548
+
...
549
+
```
550
+
551
+
Make sure you have `config.yaml`in`root` of the application. This config.yaml should be copied from third step of [this](https://signoz.io/docs/collection-agents/docker/install/#step-2-create-collector-configuration)
552
+
553
+
- Replace `<run_command>` with the command to run your application
554
+
- `<service_name>` is name of your service
555
+
556
+
557
+
**Step 2.** Run your Docker container
558
+
559
+
Run your docker container to start exporting.
560
+
561
+
```bash
562
+
docker build -t <image-name>.&& docker run -d -p <host-port>:<container-port><image-name>
563
+
```
564
+
565
+
- Replace `<image-name>`, `<host-port>`, and `<container-port>` with values for your application.
566
+
567
+
- `-d` runs the container in detached mode
568
+
569
+
- `-p` maps a host port to a container port
570
+
571
+
572
+
**Step 3.** You can validate if your application is sending traces to SigNoz cloud by following the instructions [here](#validating-instrumentation-by-checking-for-traces).
573
+
574
+
In case you encounter an issue where all applications do not get listed in the services section then please refer to the [troubleshooting section](#troubleshooting-your-signoz-installation).
- Replace `<run_command>` with the command to run your application
511
+
- Set the `<region>` to match your SigNoz Cloud [region](https://signoz.io/docs/ingestion/signoz-cloud/overview/#endpoint)
512
+
- Replace `<your-ingestion-key>` with your SigNoz [ingestion key](https://signoz.io/docs/ingestion/signoz-cloud/keys/)
513
+
-`<service_name>` is name of your service
514
+
515
+
The above steps install OpenTelemetry dependencies directly inside the Docker container without altering `requirements.txt` file of project & sets environment variables to export the traces.
516
+
517
+
**Step 2.** Run your Docker container
518
+
519
+
Here's how you can run your docker container:
520
+
521
+
```bash
522
+
docker build -t <image-name>.&& docker run -d -p <host-port>:<container-port><image-name>
523
+
```
524
+
525
+
- Replace `<image-name>`, `<host-port>`, and `<container-port>` with values for your application.
526
+
527
+
-`-d` runs the container in detached mode
528
+
-`-p` maps a host port to a container port
529
+
530
+
531
+
**Step 3.** Validate if your application is sending traces to SigNoz cloud by following the instructions [here](#validating-instrumentation-by-checking-for-traces).
532
+
533
+
In case you encounter an issue where all applications do not get listed in the services section then please refer to the [troubleshooting section](#troubleshooting-your-signoz-installation).
534
+
535
+
---
536
+
537
+
#### Send traces via OTel Collector binary
538
+
539
+
**Step 1.** Configure OpenTelemetry to run in Docker Container
540
+
541
+
Add the following in your Dockerfile.
542
+
543
+
```bash
544
+
# install OpenTelemetry Collector in Docker container
545
+
FROM otel/opentelemetry-collector-contrib:0.131.0 AS otel
# Run app.py with OpenTelemetry instrumentation when the container launches
572
+
CMD sh -c "/otelcol-contrib --config=/etc/otelcol-contrib/config.yaml & opentelemetry-instrument <run_command>
573
+
...
574
+
```
575
+
576
+
Make sure you have `config.yaml`in`root` of the application. This config.yaml should be copied from third step of [this](https://signoz.io/docs/collection-agents/docker/install/#step-2-create-collector-configuration)
577
+
578
+
- Replace `<run_command>` with the command to run your application
579
+
- `<service_name>` is name of your service
580
+
581
+
582
+
**Step 2.** Run your Docker container
583
+
584
+
Run your docker container to start exporting.
585
+
586
+
```bash
587
+
docker build -t <image-name>.&& docker run -d -p <host-port>:<container-port><image-name>
588
+
```
589
+
590
+
- Replace `<image-name>`, `<host-port>`, and `<container-port>` with values for your application.
591
+
592
+
- `-d` runs the container in detached mode
593
+
594
+
- `-p` maps a host port to a container port
595
+
596
+
597
+
**Step 3.** You can validate if your application is sending traces to SigNoz cloud by following the instructions [here](#validating-instrumentation-by-checking-for-traces).
598
+
599
+
In case you encounter an issue where all applications do not get listed in the services section then please refer to the [troubleshooting section](#troubleshooting-your-signoz-installation).
0 commit comments