-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Build structure for metrics and logs API support #32150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overall structure looks good to me, this provides a solid foundation for the documentation.
Content-wise, support for the OpenTelemetry Logs and Metrics APIs is provided through two mechanisms depending on the SDK language.
In Python, Ruby, Go, and Rust Datadog SDKs, customers should install an OpenTelemetry OTLP Exporter and set DD_{METRICS,TRACE,LOGS}_OTEL_ENABLED=True. Automatic instrumentation should be used where available; if a library doesn’t support it yet, we’ll provide manual instrumentation examples. Here’s a Python example currently in review: https://github.com/DataDog/dd-trace-py/blob/ffe86e62eade9978aa3519f446767566e52963b3/ddtrace/opentelemetry/__init__.py
In Java, PHP, Node.js, and .NET Datadog SDKs, these libraries don’t rely on (or can not be installed alongside) the OpenTelemetry SDK . Instead, they implement the OpenTelemetry APIs in a way that closely mirrors how OpenTelemetry SDK encodes and submits Metrics and Logs. Customers shouldn’t install an OpenTelemetry Exporter in these SDKs. For automatic instrumentation, they are expected to set DD_{METRICS,TRACE,LOGS}_OTEL_ENABLED=True and use the Logs or Metrics API. The Datadog SDK will send data in an OpenTelemetry compatible format (OTLP). For manual instrumentation, each library exposes a MeterProvider and LogsProvider (similar to TracerProvider) that can be configured using the OpenTelemetry API. Example (Node.js, in review): https://github.com/DataDog/dd-trace-js/blob/272ea2773117168fbda72c31150b8f07162354fe/docs/API.md#opentelemetry-logs
All SDKs will support the configurations described here: https://docs.google.com/document/d/1HHcIAa9GzoMsQaOU_G9G19cwwvfXVaVf9UOi6yFKaT0/edit?tab=t.0#heading=h.u0kkcufm68ls. There might be slight difference between implementations but it will be good to centralize these configs in one place.
For each Datadog SDK the metrics and logs API should be fully supported within the next few months (🤞 ).
|
@mabdinur - This should now be in a good place for you to review and fill in some more detailed content! I left lots of placeholders for config or code examples. Feel free to adjust anything. 🙇 Note that there may be some wonky artifacts due to copying the template from Python and Java metrics pages to all other languages. Also, I created some Happy to adjust anything if you have different perspectives on the sections I added. Thanks! |
What does this PR do? What is the motivation?
Previews:
TODOs:
otel-custom-instrumentationsnippet.Changes:
content/en/opentelemetry/config/environment_variable_support.md.content/en/opentelemetry/instrument/api_support/_index.mdto include metrics and logs details.layouts/shortcodes/otel-config-precedence.en.md: Config precedence content.layouts/shortcodes/otel-overview-exporter.en.md: Exporter-based setup overview content.layouts/shortcodes/otel-overview-native.en.md: Native-based setup overview content.Merge instructions
Merge readiness:
For Datadog employees:
Your branch name MUST follow the
<name>/<description>convention and include the forward slash (/). Without this format, your pull request will not pass CI, the GitLab pipeline will not run, and you won't get a branch preview. Getting a branch preview makes it easier for us to check any issues with your PR, such as broken links.If your branch doesn't follow this format, rename it or create a new branch and PR.
[6/5/2025] Merge queue has been disabled on the documentation repo. If you have write access to the repo, the PR has been reviewed by a Documentation team member, and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #documentation channel in Slack.
Additional notes