-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add Agentless Datadog Trace Exporter #38
Conversation
…ed serverless code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed some parts of the code and left a few comments so that you can keep working on this; most importantly I think you need to run make fmt
and make
to run all the linters and tests that can help catch errors (we will need them to pass to have a PR accepted upstream)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second round; impi
(after running make fmt
) and misspell
still give some errors that need to be addressed
Well that's annoying, I just stumbled on this branch/PR after successfully migrating the tracing portion of Oh well, mine works but is just a minimal 1-1 (where possible) port, so I look forward to this official one being released. 👍 While I'm here (and sorry if off-topic), I'm curious about the pros and cons of an OTEL exporter vs an OTEL API compatible wrapper as used in Also, does "agentless" mean it'll go direct to datadoghq without dd-agent? Thanks. |
@NathanBaulch the goal here is we really need to be able to live in the otel-collector. simply put, existing otel users likely aren't going to want to run a datadog agent along with an opentelemetry-collector (maybe they will? we plan to add agent export as well down the road). So, yes agentless means direct to api intake. We're still iterating here, as circumventing the agent and our own tracing clients introduces a whole can of worms around metric computation but we hope to have a PR in with the Otel folks by EOW. as far as Sorry to hear about the duped work (nice work tho, fwiw!), but we can certainly keep you updated here on how this work is going and we'd love any feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking better! I left some more comments, I think we would benefit from some unit test coverage at this point. One thing I am worried about is that the Agent might spam logs when importing its packages/running its internal functions, have you noticed anything in the end to end tests?
@mx-psi I tried to address most of the feedback and add unit tests for the span/trace translation work. Some of the trace connection stuff is still not covered in tests, I think I have to wire up a mock server for some of that, and I wasn't totally sure how to manage merging up the config tags. But punting on those bits for now so I can work on rebasing off the most up to date metrics exporter work so that the config is in a good place. I'd also like to start gameplanning on how to start the upstream PR process if you think this is in a reasonably good place, so let me know if there are other areas here where the code needs to be fixed before that. |
Added some additional tests, rebasing off master brought in a bunch of changes to metric stuff that probably is now out of date. Going to wait for your metrrics PR and try to rebase off that branch |
@mx-psi So i think this is pretty much in a good state, i added mock server tests to test the trace connection so i think our code coverage is pretty good at this point. I just need to rebase off master + your metric exporter work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I have yet to test it on the backend but since you already did I am going to approve. I left a bunch of small typos to fix/TODOs that can be removed too.
) Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.11.0 to 1.11.1. - [Release notes](https://github.com/klauspost/compress/releases) - [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml) - [Commits](klauspost/compress@v1.11.0...v1.11.1) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.34.33 to 1.35.2. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-go@v1.34.33...v1.35.2) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.34.32 to 1.35.2. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-go@v1.34.32...v1.35.2) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
#1193) Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.34.33 to 1.35.2. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-go@v1.34.33...v1.35.2) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/signalfx/sapm-proto](https://github.com/signalfx/sapm-proto) from 0.6.0 to 0.6.2. - [Release notes](https://github.com/signalfx/sapm-proto/releases) - [Commits](signalfx/sapm-proto@v0.6.0...v0.6.2) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.20.8+incompatible to 2.20.9+incompatible. - [Release notes](https://github.com/shirou/gopsutil/releases) - [Commits](shirou/gopsutil@v2.20.8...v2.20.9) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…1198) Bumps [github.com/shirou/gopsutil](https://github.com/shirou/gopsutil) from 2.20.6+incompatible to 2.20.9+incompatible. - [Release notes](https://github.com/shirou/gopsutil/releases) - [Commits](shirou/gopsutil@v2.20.6...v2.20.9) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…or (#1196) Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.34.32 to 1.35.2. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md) - [Commits](aws/aws-sdk-go@v1.34.32...v1.35.2) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…1178) * Add metrics translation functions * Improve docs and make newGauge private * Add basic hostname resolution This will be expanded in the future to more closely replicate the Datadog Agent behavior * Remove Series struct and use []datadog.Metric We can add it back if necessary in the future
Should we close this now that it is available upstream? |
This is probably at a point where it could benefit from review, cc @mx-psi , some things to note:
There's still some uncertainty around a few trace's span translation choices, as well as how to grab the global config stuff like hostname and env and apply it to the trace payloads (as well as the order of precedence for things like
DD_SERVICE
as opposed to the service already set by the tracer). but for the most part the implementation is complete, as is the flushing of trace and stats payloads.the most of what's in
/apm
, including tests and the snapshots, i've just grabbed from serverless. I tried to remove everything that wasn't being used by our implementation, but didn't update the serverless tests, so they'll probably fail.The big things here are going to be:
/apm
directly from that repo.otel-collector-e2e-tests
package, lmk if you have any trouble with that.