Skip to content
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

[receiver/datadog] correlating datadog traces with logs #23057

Closed
povilasv opened this issue Jun 5, 2023 · 4 comments
Closed

[receiver/datadog] correlating datadog traces with logs #23057

povilasv opened this issue Jun 5, 2023 · 4 comments
Assignees
Labels

Comments

@povilasv
Copy link
Contributor

povilasv commented Jun 5, 2023

Component(s)

receiver/datadog

Is your feature request related to a problem? Please describe.

We would like to correlate traces received by datadogreceiver with logs.

Datadog libraries automatically provide datadog span ids and trace ids with the logs for various languages:

Example log:

2023-06-05 06:01:30,459 INFO [__main__] [test-enhanced.py:44] [dd.service= dd.env= dd.version= dd.trace_id=6249785623524942554 dd.span_id=2
28114450199004348] - Starting a new Game!

Describe the solution you'd like

Provide datadog.span.id and datadog.trace.id as attributes to the spans made by datadogreceiver.

Describe alternatives you've considered

No response

Additional context

No response

@povilasv povilasv added enhancement New feature or request needs triage New item requiring triage labels Jun 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@songy23 songy23 changed the title correlating datadog traces with logs [receiver/datadog] correlating datadog traces with logs Jun 6, 2023
@boostchicken
Copy link
Member

So what exactly would you like it do? Can we get more specific? This receiver takes in traces. Do you want a receiver that takes in logs and adds related trace info to it based on it?

@JaredTan95 JaredTan95 removed the needs triage New item requiring triage label Jun 12, 2023
@povilasv
Copy link
Contributor Author

Hey @boostchicken sorry for late response, so as described atm I would like to:

Add datadog.span.id and datadog.trace.id as attributes to the spans made by datadogreceiver.

But any alternative suggestions are welcome and I can work on it

jpkrohling pushed a commit that referenced this issue Aug 4, 2023
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->

Add datadog trace id and span id so we cancorrelate traces received by
datadogreceiver with logs.

Datadog libraries automatically provide datadog span ids and trace ids
with the logs for various languages:

-
https://docs.datadoghq.com/tracing/other_telemetry/connect_logs_and_traces/python/

-https://docs.datadoghq.com/tracing/other_telemetry/connect_logs_and_traces/java?tab=log4j2

Example log for python:
```
2023-06-05 06:01:30,459 INFO [__main__] [test-enhanced.py:44] [dd.service= dd.env= dd.version= dd.trace_id=6249785623524942554 dd.span_id=2
28114450199004348] - Starting a new Game!
```

**Link to tracking Issue:**
#23057
**Testing:** <Describe what testing was performed and which tests were
added.>
- local testing with python app
- updated unit tests
- 
**Documentation:** <Describe the documentation added.>
@github-actions
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants