|
1 | 1 | --- |
2 | | -title: OpenTelemetry |
| 2 | +title: OpenTelemetry Source |
3 | 3 | disable_toc: false |
4 | 4 | --- |
5 | 5 |
|
6 | 6 | ## Overview |
7 | 7 |
|
8 | 8 | Use Observability Pipelines' OpenTelemetry (OTel) source to collect logs from your OTel Collector through HTTP or gRPC. Select and set up this source when you set up a pipeline. The information below is configured in the pipelines UI. |
9 | 9 |
|
| 10 | +**Notes**: |
| 11 | +- If you are using the Datadog Distribution of OpenTelemetry (DDOT) Collector, use the OpenTelemetry source to [send logs to Observability Pipelines](#send-logs-from-the-datadog-distribution-of-opentelemetry-collector-to-observability-pipelines). |
| 12 | +- If you are using the Splunk HEC Distribution of the OpenTelemetry Collector, use the [Splunk HEC source][4] to send logs to Observability Pipelines. |
| 13 | + |
10 | 14 | ### When to use this source |
11 | 15 |
|
12 | 16 | Common scenarios when you might use this source: |
@@ -62,9 +66,48 @@ The Worker exposes the gRPC endpoint on port 4318. This is an example of configu |
62 | 66 |
|
63 | 67 | Based on these example configurations, these are values you enter for the following environment variables: |
64 | 68 |
|
65 | | -- HTTP listener address: `worker:4317` |
66 | | -- gRPC listener address: `worker:4318` |
| 69 | +- HTTP listener address: `worker:4318` |
| 70 | +- gRPC listener address: `worker:4317` |
| 71 | + |
| 72 | +## Send logs from the Datadog Distribution of OpenTelemetry Collector to Observability Pipelines |
| 73 | + |
| 74 | +To send logs from the Datadog Distribution of the OpenTelemetry (DDOT) Collector: |
| 75 | +1. Deploy the DDOT Collector using Helm. See [Install the DDOT Collector as a Kubernetes DaemonSet][5] for instructions. |
| 76 | +1. [Set up a pipeline][6] on Observability Pipelines using the [OpenTelemetry source](#set-up-the-source-in-the-pipeline-ui). |
| 77 | + 1. (Optional) Datadog recommends adding an [Edit Fields processor][7] to the pipeline that appends the field `op_otel_ddot:true`. |
| 78 | + 1. When you install the Worker, for the OpenTelemetry source environment variables: |
| 79 | + 1. Set your HTTP listener to `0.0.0.0:4318`. |
| 80 | + 1. Set your gRPC listener to `0.0.0.0:4317`. |
| 81 | + 1. After you install the Worker and deployed the pipeline, update the OpenTelemetry Collector's [`otel-config.yaml`][9] to include an exporter that sends logs to Observability Pipelines. For example: |
| 82 | + ``` |
| 83 | + exporters: |
| 84 | + otlphttp: |
| 85 | + endpoint: http://opw-observability-pipelines-worker.default.svc.cluster.local:4318 |
| 86 | + ... |
| 87 | + service: |
| 88 | + pipelines: |
| 89 | + logs: |
| 90 | + exporters: [otlphttp] |
| 91 | + ``` |
| 92 | + 1. Redeploy the Datadog Agent with the updated [`otel-config.yaml`][9]. For example, if the Agent is installed in Kubernetes: |
| 93 | + ``` |
| 94 | + helm upgrade --install datadog-agent datadog/datadog \ |
| 95 | + --values ./agent.yaml \ |
| 96 | + --set-file datadog.otelCollector.config=./otel-config.yaml |
| 97 | + ``` |
| 98 | +
|
| 99 | +**Notes**: |
| 100 | +- Because DDOT is sending logs to Observability Pipelines, and not the Datadog Agent, the following settings do not work for sending logs from DDOT to Observability Pipelines: |
| 101 | + - `DD_OBSERVABILITY_PIPELINES_WORKER_LOGS_ENABLED` |
| 102 | + - `DD_OBSERVABILITY_PIPELINES_WORKER_LOGS_URL` |
| 103 | +- Logs sent from DDOT might have nested objects that prevent Datadog from parsing the logs correctly. To resolve this, Datadog recommends using the [Custom Processor][8] to flatten the nested `resource` object. |
67 | 104 |
|
68 | 105 | [1]: https://opentelemetry.io/docs/collector/ |
69 | 106 | [2]: /observability_pipelines/sources/ |
70 | | -[3]: /observability_pipelines/configuration/install_the_worker/advanced_worker_configurations/#bootstrap-options |
| 107 | +[3]: /observability_pipelines/configuration/install_the_worker/advanced_worker_configurations/#bootstrap-options |
| 108 | +[4]: /observability_pipelines/sources/splunk_hec/#send-logs-from-the-splunk-distributor-of-the-opentelemetry-collector-to-observability-pipelines |
| 109 | +[5]: /opentelemetry/setup/ddot_collector/install/kubernetes_daemonset/?tab=datadogoperator |
| 110 | +[6]: /observability_pipelines/configuration/set_up_pipelines/ |
| 111 | +[7]: /observability_pipelines/processors/edit_fields#add-field |
| 112 | +[8]: /observability_pipelines/processors/custom_processor |
| 113 | +[9]: https://docs.datadoghq.com/opentelemetry/setup/ddot_collector/install/kubernetes_daemonset/?tab=helm#configure-the-opentelemetry-collector |
0 commit comments