-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
pkg/trace/api: add /info discovery endpoint #7344
Conversation
Hi @gbbr What do values like those below mean? It looks to me like a feature flag hasn't been set. The client wouldn't expect these to be null but booleans. These would parse as
This one looks like an actually nullable value, rather than the consequence of an unset feature flag, and I'd argue complete absence is a better policy in this case.
|
@richardstartin nothing that is in the
|
If it helps, here's a fully populated example object from the tests: datadog-agent/pkg/trace/api/api_test.go Lines 687 to 843 in c16442c
|
Removed ProxyURL which is probably not interesting at all to a tracer... The rest we can leave for debugging... |
@dougqh @richardstartin I took all of your feedback, and made the Go code uglier in order to get prettier JSON. I also manually selected which config options should show up, and removed any which seemed like they might contain sensitive information or be irrelevant to the Please check the updated PR description and let me know your thoughts. |
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.
👍🏻
rec := httptest.NewRecorder() | ||
req := httptest.NewRequest("GET", "/info", nil) | ||
h.ServeHTTP(rec, req) | ||
if rec.Body.String() != `{ |
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.
nice, I didn't know that there is field ordering on the JSON marshal. I would have expected maps to be flaky due to go random iterations
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.
Maps can't be flaky in ordering when they have only one element 🤷♂️ 😄 I didn't even notice.
…gs, stats & drops (#859) This change adds a multitude of new features, such as support for feature flags, agent discovery, client-side stats computations and enabling the dropping of P0 traces in the client. ### Feature flags Support for feature flags by means of: * `WithFeatureFlags` tracer start option. * `DD_TRACE_FEATURES` environment variable which takes a list of comma or space separated flag tokens. ### Agent discovery When the feature flag `discovery` is set, support for detecting features by means of the new agent (7.27.0) discovery endpoint added in DataDog/datadog-agent#7344 and DataDog/datadog-agent#7495 becomes enabled. ### Client-computed stats and dropping p0's When `discovery` is enabled, if the agent supports client-computed stats and dropping p0's in the client, the tracer can now do this by means of the newly added concentrator and drop logic. ### TODO * Obfuscation is not yet supported in the client but will be added in a subsequent PR by factoring out the obfuscator code from the agent into a separate package to be shared with this module.
…gs, stats & drops (#859) This change adds a multitude of new features, such as support for feature flags, agent discovery, client-side stats computations and enabling the dropping of P0 traces in the client. ### Feature flags Support for feature flags by means of: * `WithFeatureFlags` tracer start option. * `DD_TRACE_FEATURES` environment variable which takes a list of comma or space separated flag tokens. ### Agent discovery When the feature flag `discovery` is set, support for detecting features by means of the new agent (7.27.0) discovery endpoint added in DataDog/datadog-agent#7344 and DataDog/datadog-agent#7495 becomes enabled. ### Client-computed stats and dropping p0's When `discovery` is enabled, if the agent supports client-computed stats and dropping p0's in the client, the tracer can now do this by means of the newly added concentrator and drop logic. ### TODO * Obfuscation is not yet supported in the client but will be added in a subsequent PR by factoring out the obfuscator code from the agent into a separate package to be shared with this module.
Example response from
http://localhost:8126/info
: