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

chore: refactor Datadog Status/Flare component in preparation for shared telemetry via reflector #483

Merged
merged 3 commits into from
Feb 10, 2025

Conversation

tobz
Copy link
Member

@tobz tobz commented Feb 10, 2025

Summary

This PR does a bunch of refactoring around how we create/spawn the component previously known as the "Datadog Status/Flare Destination".

Primarily, it moves the code into the ADP binary crate itself, and de-componentizes it: now we just have standalone types, we spawn a standalone task, and so on. This is in preparation of having it draw its telemetry data from a new "reflector"-based pattern. We've also done some other work around ListenAddress to make it possible to cleanly pull the "what is our secure API listen address?" information necessary when registering ourselves as a remote agent.

This PR also includes the basic code for the reflector, which is included to intend to show roughly what we'll be moving to. This PR doesn't include all of the work to actually utilize the reflector, though, which will be part of a follow-up PR.

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

How did you test this PR?

Built and ran ADP locally in non-standalone mode, and ensured that the Remote Agent task that replaces the component still runs and registers ADP as a remote agent.

References

N/A

@tobz tobz requested a review from a team as a code owner February 10, 2025 14:52
@tobz tobz added the type/chore Updates to dependencies or general "administrative" tasks necessary to maintain the codebase/repo. label Feb 10, 2025
@github-actions github-actions bot added area/core Core functionality, event model, etc. area/io General I/O and networking. area/components Sources, transforms, and destinations. destination/datadog Common Datadog destination code. labels Feb 10, 2025
Copy link
Contributor

@rayz rayz left a comment

Choose a reason for hiding this comment

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

LGTM, just curious: are there any existing code we could migrate to use this new reflector pattern besides the shared telemetry?

@tobz
Copy link
Member Author

tobz commented Feb 10, 2025

LGTM, just curious: are there any existing code we could migrate to use this new reflector pattern besides the shared telemetry?

My thought is:

  • status/flare support
  • streaming telemetry API (gRPC stuff for a theoretical admin UI showing live stats)

We could potentially also use it for internal telemetry, like the Prometheus scrape endpoint... but it's not clear to me (yet) if all of those use cases can be aggregated the same way, since the implication is that you need the reflector to do aggregation for metrics so you always get the latest gauge value, or the counter total, and so on.

The other thing is that we can use the reflector pattern for logs, too... where it might just be that we have a fixed-size ring buffer of the logs instead of an aggregated set of metrics, etc.

@tobz tobz merged commit 258633d into main Feb 10, 2025
21 checks passed
@tobz tobz deleted the tobz/telemetry-reflector-store branch February 10, 2025 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/components Sources, transforms, and destinations. area/core Core functionality, event model, etc. area/io General I/O and networking. destination/datadog Common Datadog destination code. type/chore Updates to dependencies or general "administrative" tasks necessary to maintain the codebase/repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants