-
Notifications
You must be signed in to change notification settings - Fork 445
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
[contrib] add orchestrion integration configuration #3074
[contrib] add orchestrion integration configuration #3074
Conversation
60deffb
to
ed1218e
Compare
Datadog ReportBranch report: ✅ 0 Failed, 5201 Passed, 72 Skipped, 2m 47.81s Total Time |
f06d0d3
to
8591beb
Compare
8591beb
to
6d487dd
Compare
|
||
# ddapm-test-agent is used to observe side effects from the tracer during integration tests. | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 |
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.
BenchmarksBenchmark execution time: 2025-01-20 15:18:12 Comparing candidate commit 6e09796 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 58 metrics, 1 unstable metrics. |
9386875
to
d0e5e17
Compare
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.
LGTM overall! left some comments / questions 🙇
@@ -29,6 +29,6 @@ func ExampleHook() { | |||
cLog := logrus.WithContext(sctx).WithTime(time.Date(2000, 1, 1, 1, 1, 1, 0, time.UTC)) | |||
// Log as desired using the context-aware logger | |||
cLog.Info("Completed some work!") | |||
// Output: | |||
// You should see: |
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'm curious the motivation of the change, was the testable example failing? I'm wondering if we actually run these in CI 🤔
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.
They run as part of go test
normal behaviour. It didn't work because the hook is not adding the fields for trace ID and span ID.
I checked the hook's code and it wasn't changed. I'm not sure why it triggered here, but it did.
// short-hand request functions [http.Get], [http.Head], [http.Post], and | ||
// [http.PostForm]. Using these functions allows for better control over the | ||
// trace context propagation. | ||
package client |
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.
could this package be made internal? it doesn't seem to make a lot of sense outside of Orchestrion right?
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.
it's intended to allow for users to be able to manually do what orchestrion automatically does, and provides context-aware versions of short-hand functions in the net/http package which otherwise allow no context.
This package actually has very little use to orchestrion itself (as it enables GLS-based context propagation, making the context.Context
passing possibly un-necessary).
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.
what I mean is this package doesn't provide any tracing specific funcionality, these are just convenience helpers over http.NewRequestWithContext
+ http.DefaultClient.Do
that IMO shouldn't be part of the exposed api of dd-trace-go.
@@ -0,0 +1,65 @@ | |||
## Orchestrion Integration Tests |
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.
why does the folder name start with _
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.
The go
toolchain (alledgedly) ignores folders starting with _
so it makes it clear that this is a module delineation that isn't meant for users to directly use.
888d119
to
afde3ea
Compare
d770999
to
6e09796
Compare
What does this PR do?
Moves orchestrion integrations configuration from orchestrion itself to dd-trace-go.
Motivation
This improves maintainability of automatic injection configuration, and allows orchestrion customers more fine-grained control of what gets injected automatically.
Reviewer's Checklist
v2-dev
branch and reviewed by @DataDog/apm-go.Unsure? Have a question? Request a review!