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

feat(otelcol/exporter/datadog) Add Datadog exporter wrapper #739

Merged
merged 22 commits into from
Aug 27, 2024

Conversation

polyrain
Copy link
Contributor

@polyrain polyrain commented May 2, 2024

PR Description

This PR adds a wrapper around the Datadog Exporter from the opentelemetry-collector-contrib repo. It enables use of the Datadog exporter, which allows Alloy to send telemetry (metrics and traces at this point) to Datadog.

This is useful in migrating a Datadog setup towards a more OSS architecture. By allowing Alloy to talk to Datadog, Alloy can serve a new wedge of users using this proprietary platform and embrace OTel more.

Documentation and more tests need to be added, as well as more scrutiny; I intend on continuing work on this branch to address these over the next few days. This MR has dependency on #711 , hence the large diff 😅

Which issue(s) this PR fixes

Fixes #714

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

@CLAassistant
Copy link

CLAassistant commented May 2, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

github-actions bot commented Jun 3, 2024

This PR has not had any activity in the past 30 days, so the needs-attention label has been added to it.
If you do not have enough time to follow up on this PR or you think it's no longer relevant, consider closing it.
The needs-attention label signals to maintainers that something has fallen through the cracks. No action is needed by you; your PR will be kept open and you do not have to respond to this comment. The label will be removed the next time this job runs if there is new activity.
Thank you for your contributions!

@polyrain
Copy link
Contributor Author

polyrain commented Jul 20, 2024

@wildum I've tested this locally and it works. I'll get onto some documentation tomorrow, but can you look over the code as it is now so I can get some feedback? I need to update the tests to acknowledge the new defaults for the config still as well 😅

@polyrain polyrain force-pushed the feat/datadog-exporter branch 2 times, most recently from f284ad8 to 713da2b Compare July 21, 2024 04:49
@polyrain polyrain marked this pull request as ready for review July 21, 2024 05:01
Copy link
Contributor

@wildum wildum left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! I reviewed only the code without checking the defaults and left a few comments. We will also need a config converter for this component (see https://github.com/grafana/alloy/tree/main/internal/converter/internal/otelcolconvert).
Can't wait for Alloy to get its first community component :)

internal/component/otelcol/config_datadog.go Outdated Show resolved Hide resolved
internal/component/otelcol/exporter/datadog/datadog.go Outdated Show resolved Hide resolved
internal/component/otelcol/exporter/datadog/datadog.go Outdated Show resolved Hide resolved
internal/component/otelcol/config_datadog.go Outdated Show resolved Hide resolved
internal/component/otelcol/config_datadog.go Outdated Show resolved Hide resolved
internal/component/otelcol/exporter/datadog/datadog.go Outdated Show resolved Hide resolved
@polyrain
Copy link
Contributor Author

polyrain commented Aug 16, 2024

I've addressed the PR comments and rebased on main, testing locally seems to be working 👍 @wildum can I get another look? I'll add the config converter now

Still an issue where endpoint is required, we could make a custom type but that feels a bit too much
@clayton-cornell clayton-cornell added the type/docs Docs Squad label across all Grafana Labs repos label Aug 16, 2024
polyrain and others added 2 commits August 19, 2024 10:19
Apply doc updates from review

Co-authored-by: Clayton Cornell <[email protected]>
@polyrain polyrain requested a review from wildum August 22, 2024 03:57
Copy link
Contributor

@wildum wildum left a comment

Choose a reason for hiding this comment

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

I did another round of review. Good job and thanks for all the efforts. The config for this component is crazy but we are getting close to get it ready!

@clayton-cornell
Copy link
Contributor

clayton-cornell commented Aug 26, 2024

I've triggered a rebase to pull in the newly added shared community notifcation. The shortcode for the notification is included in a review suggestion. The rendered output looks like this:

image

Copy link
Contributor

@clayton-cornell clayton-cornell left a comment

Choose a reason for hiding this comment

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

Some additional doc suggestions:

  1. Add the community component shared content at the top of the doc
  2. Tidy up the table formatting
  3. Remove some extra empty lines and spaces
  4. Some other minor syntax/layout suggestions

Copy link
Contributor

@clayton-cornell clayton-cornell left a comment

Choose a reason for hiding this comment

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

Some additional doc suggestions:

  1. Add the community component shared content at the top of the doc
  2. Tidy up the table formatting
  3. Remove some extra empty lines and spaces
  4. Some other minor syntax/layout suggestions

@polyrain polyrain requested a review from wildum August 26, 2024 23:49
Copy link
Contributor

@clayton-cornell clayton-cornell left a comment

Choose a reason for hiding this comment

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

Docs look OK, Approving for docs. If anything else comes up for docs, we can catch it in a new PR :-)

Copy link
Contributor

@wildum wildum left a comment

Choose a reason for hiding this comment

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

Thanks for your work, we are proud to welcome our first community component contributor!

@wildum wildum merged commit bf90403 into grafana:main Aug 27, 2024
15 checks passed
@polyrain polyrain deleted the feat/datadog-exporter branch August 27, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-attention type/docs Docs Squad label across all Grafana Labs repos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Datadog exporter in Grafana Alloy
4 participants