Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Datadog SDK OTel Metrics and Logs API Support: Phase 1#32610

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
brett0000FF wants to merge15 commits intomaster
base:master
Choose a base branch
Loading
frombrett.blue/otel-log-metric-phase-1

Conversation

@brett0000FF
Copy link
Contributor

@brett0000FFbrett0000FF commentedNov 4, 2025
edited
Loading

What does this PR do? What is the motivation?

Document phase 1 of OTel Metrics and Logs API support for:

  • Node.js
  • Python
  • .NET

Previews

Changes

  • Updatedcontent/en/opentelemetry/instrument/api_support/_index.md to include metrics and logs details.
  • Created reusable shortcodes to use across pages to make maintenance easier.
    • 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.
  • Added new environment variables and log/metrics content tocontent/en/opentelemetry/config/environment_variable_support.md.
  • Added page-level tabs for Traces, Metrics, and Logs for Python, Node.js, and .NET.

Merge instructions

Merge readiness:

  • Ready for merge

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 theSquash 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

@brett0000FFbrett0000FF requested review froma team ascode ownersNovember 4, 2025 22:52
@brett0000FFbrett0000FF added the WORK IN PROGRESSNo review needed, it's a wip ;) labelNov 4, 2025
@github-actionsgithub-actionsbot added the ArchitectureEverything related to the Doc backend labelNov 4, 2025
@github-actions
Copy link
Contributor

Preview links (active after thebuild_preview check completes)

New or renamed files

Removed or renamed files (these should redirect)

Modified Files

Copy link
Contributor

@mabdinurmabdinur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@zacharycmontoya can you also give this a review


1. Install the Datadog SDK:
```sh
[Code example]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@link04 can you fill this in

```
4. Instrument your application:
```py
[Code example]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I can also fill this out in a bit

Copy link
Contributor

@duncanhewettduncanhewett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is looking good - I left a few comments.

To avoid confusion I think it would be good to also have the Metrics/Logs tabs on the other languages and say 'coming soon' with a link to contact support for more details.


##Setup

The setup for OpenTelemetry metrics and logs support depends on your language, specifically whether you need to install a separate OpenTelemetry Exporter.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Do you think it's necessary to explain the fact that some languages need the exporter and some don't on this page?

You'll get the correct instructions on each language page, so I'm wondering if it's confusing to explain this here. Or another way: it's not going to affect any choice you make from this page.

(Also I think for Python the Exporter is only required for Logs/Metrics not Traces, so arguably it's confusing to say you need the Exporter for Python here.)

brett0000FF reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Good point! I agree that it's better to omit this. It adds unnecessary confusion when a user would just be guided to their specific page anyways.

##Prerequisites

-**Datadog SDK**: dd-trace-py version 3.18.0 or later.
-**OpenTelemetry SDK**: The standard opentelemetry-sdk package for Python.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We have steps in the setup for installing the SDK and Exporter, so it could be confusing to have them as prerequisites as well?

We also say in a note in the Overview section that you need the SDK and Exporter - I'm not sure we need that note either. (The note makes sense for the other languages where we're sayingnot to install the SDK/Exporter)

brett0000FF reacted with thumbs up emoji
This example shows how logs emitted within an active Datadog span are automatically correlated.
```python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

(Example needs completing)

`OTEL_EXPORTER_OTLP_LOGS_PROTOCOL`
: **Description**: Specifies the OTLP transport protocol. Takes precedence over `OTEL_EXPORTER_OTLP_PROTOCOL`.
: **Accepted values**: `grpc`, `http/protobuf`, `http/json`
: **Default**: (SDK-dependent)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Can we show the default for Python here?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I ended up removing this content from the language-specific pages in favor of the centralized environment variable config page (to avoid duplicating). What do you think? (We could add the details per SDK here too).

### Existing Datadog log injection
If you are currently using `DD_LOGS_INJECTION=true` and an Agent to tail log files:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Should this also say to configure the Agent to not tail the application log file? Otherwise the logs will be duplicated - we say this on the .NET page.

##Datadog SDK configuration
These environment variables enable the Datadog SDK to ingest OpenTelemetry Metrics and Logs API data. For guides on how to instrument your application, see the[language-specific instrumentation documentation][14].

`DD_METRICS_OTEL_ENABLED`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We should also includeDD_TRACE_OTEL_ENABLED in this section

brett0000FF reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Added! Is the default for this true since it maps to !OTEL_SDK_DISABLED, which is false by default?

Note: Also applied your other suggestions to the config page. Thanks!

:**Datadog convention**:`DD_TAGS` <br>
**Description**: Key-value pairs to be used as resource attributes. <br>
**Notes**: Datadog-defined configurations take precedence.
-`deployment.environment.name` (maps to`DD_ENV`): Resolved with the following precedence: <br>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I like this breakdown for ENV and VERSION. Can we also include SERVICE here in this same block? TheOTEL_SERVICE_NAME environment variable still deserves a mention but I think having the key UST info all here would be more clear.

brett0000FF reacted with thumbs up emoji

`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE`
:**Description**: Specifies the aggregation`temporality` to use for each instrument kind. <br>
**Accepted values**:`Cumulative`,`Delta`,`LowMemory`. <br>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What do you think of linking out to OpenTelemetry to describe this? With this specific page linked:https://opentelemetry.io/docs/specs/otel/metrics/sdk_exporters/otlp/#additional-environment-variable-configuration

Suggested change
**Accepted values**:`Cumulative`,`Delta`,`LowMemory`. <br>
**Accepted values**:`Cumulative`,`Delta`,`LowMemory`.For more details, see the[OpenTelemetry specification][Link#].<br>

:**Description**: Specifies the aggregation`temporality` to use for each instrument kind. <br>
**Accepted values**:`Cumulative`,`Delta`,`LowMemory`. <br>
**Default**:`delta` <br>
**Notes**: This default value is Datadog's recommended configuration and differs from the OpenTelemetry specification's default.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We should link to our documentation for why it's the Datadog-recommended configuration:https://docs.datadoghq.com/opentelemetry/guide/otlp_delta_temporality/

Suggested change
**Notes**: This default value is Datadog's recommended configuration and differs from the OpenTelemetry specification's default.
**Notes**: This default value`delta`is[Datadog's recommended configuration][Link#] and differs from the OpenTelemetry specification's default.

:****Datadog convention****:`DD_SERVICE`<br>
Sets the service name<br>
**Notes**: If`service.name` is also provided in`OTEL_RESOURCE_ATTRIBUTES`, then`OTEL_SERVICE_NAME` takes precedence<br>
`service.name` (Resource Attribute)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think we should revert to the previous description while also adding theservice.name resource attribute info to theOTEL_RESOURCE_ATTRIBUTES description later.

This is resolved as a resource attribute, not fromOTEL_SERVICE_NAME.
I'm not sure where this info came from, butOTEL_SERVICE_NAMEis responsible for setting theservice.name resource attribute. It's a little weird because in our traces we don't really use resource attributes, but in our metrics and logs we do.

brett0000FF reacted with thumbs up emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@duncanhewettduncanhewettduncanhewett left review comments

@zacharycmontoyazacharycmontoyazacharycmontoya left review comments

@mabdinurmabdinurmabdinur left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

ArchitectureEverything related to the Doc backendWORK IN PROGRESSNo review needed, it's a wip ;)

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@brett0000FF@duncanhewett@zacharycmontoya@mabdinur

[8]ページ先頭

©2009-2025 Movatter.jp