Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DOCS-4621] Instructions for using OTel API to send ddtrace data #17518

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

Merged
merged 44 commits into from
Apr 21, 2023

Conversation

kayayarai
Copy link
Collaborator

What does this PR do?

For each supported language, documents how to configure OTel custom instrumentation to be collected with the DD Trace Provider into the ddtrace library, and into Datadog. Plus consolidates Context Propagation docs into a central location.

Motivation

DOCS-4621, DOCS-5092

Additional Notes


Reviewer checklist

  • Review the changed files.
  • Review the URLs listed in the Preview section.
  • Check images for PII
  • Review any mentions of "Contact Datadog support" for internal support documentation.

@kayayarai kayayarai added the WORK IN PROGRESS No review needed, it's a wip ;) label Mar 31, 2023
@kayayarai kayayarai requested review from a team as code owners March 31, 2023 21:27
@github-actions github-actions bot added the Architecture Everything related to the Doc backend label Mar 31, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 31, 2023

Preview links (active after the build_preview check completes)

New or renamed files

Removed or renamed files (these should redirect)

Renamed files

Modified Files

@github-actions github-actions bot added the Guide Content impacting a guide label Mar 31, 2023
Copy link
Member

@marcotc marcotc left a comment

Choose a reason for hiding this comment

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

Awesome work @kayayarai! ✅ regarding the Ruby and general parts of the PR.

Copy link
Contributor

@katiehockman katiehockman left a comment

Choose a reason for hiding this comment

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

Just a few comments from what I noticed so far. Thanks so much for working on this!!


| Feature | Support? | Notes |
|---------------------------------------|-------------|-----------------------------|
| [OTel Context propagation][1] | Unsupported | [Datadog distributed header format][9] is used instead. |
Copy link
Contributor

Choose a reason for hiding this comment

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

I hesitate to say that we don't support OTel context propagation. The tracers have put in a lot of work to support W3C trace context propagation, so saying "Unsupported" here isn't quite right. Maybe a separate callout in the configuration part of these pages that describes how to propagate W3C trace context propagation to support OTel context propagation would be better.

| [Span processors][2] | Unsupported | |
| [Span Exporters][3] | Unsupported | |
| `OpenTelemetry.logger` | Special | `OpenTelemetry.logger` is set to the same object as `Datadog.logger`. Configure through [custom logging][10]. |
| Trace/span [ID generators][4] | Special | ID generation is performed by `ddtrace`. |
Copy link
Contributor

Choose a reason for hiding this comment

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

This feature is more about custom id generation, which we don't support. We do allow configuration of 128-bit trace ids (or are in the process of building this feature out across languages), so we should definitely call that out on this page and discuss how to enable it.

mabdinur added a commit to DataDog/dd-trace-py that referenced this pull request Apr 7, 2023
…5492)

Blocks: DataDog/documentation#17518

The ddtrace Opentelemetry `TracerProvider` is an internal component. It
is configured when `ddtrace-run` is used to start an application. This
PR add the `TracerProvider` to the public API so that it can be
configured by applications that do not use `ddtrace-run`.

### Summary of Changes
 - Renames the `ddtrace._opentelemetry` package to `ddtrace.otel`
 - Renames opentelemetry `span.py` to `_span.py`
 - Renames opentelemetry `trace.py` to `_trace.py`
 - Updates imports to use the package and module names

## Checklist

- [x] Change(s) are motivated and described in the PR description.
- [x] Testing strategy is described if automated tests are not included
in the PR.
- [x] Risk is outlined (performance impact, potential for breakage,
maintainability, etc).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines)
are followed.
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/)).
- [x] PR description includes explicit acknowledgement/acceptance of the
performance implications of this PR as reported in the benchmarks PR
comment.

## Reviewer Checklist

- [ ] Title is accurate.
- [ ] No unnecessary changes are introduced.
- [ ] Description motivates each change.
- [ ] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [ ] Testing strategy adequately addresses listed risk(s).
- [ ] Change is maintainable (easy to change, telemetry, documentation).
- [ ] Release note makes sense to a user of the library.
- [ ] Reviewer has explicitly acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment.
Copy link
Contributor

@mabdinur mabdinur left a comment

Choose a reason for hiding this comment

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

Some nits I noticed while adding setup instructions for the python tracer.
commit: 659c551.

@kayayarai kayayarai removed the WORK IN PROGRESS No review needed, it's a wip ;) label Apr 20, 2023
Copy link
Contributor

@drichards-87 drichards-87 left a comment

Choose a reason for hiding this comment

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

Left you some minor feedback, but looks good otherwise. PR is approved.

@kayayarai kayayarai merged commit 03fc466 into master Apr 21, 2023
@kayayarai kayayarai deleted the kari/docs-4621-otel-cust-inst branch April 21, 2023 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Everything related to the Doc backend Guide Content impacting a guide
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants