-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[exporter/datadog] Move Sanitize
functionality into Validate
and Unmarshal
#8829
[exporter/datadog] Move Sanitize
functionality into Validate
and Unmarshal
#8829
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
658ea76
to
4cff6bf
Compare
@mx-psi ready for review? |
Yes! I shared this internally so someone from Datadog should review it at some point, but reviews are generally welcome :) |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
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.
This looks good to me, aside from conflicts that need resolution.
@mx-psi, are you still waiting on internal review?
@djaglowski We have the CODEOWNER review now and the conflicts have been solved :) Could you have a final look? |
…`Unmarshal` (open-telemetry#8829) * [exporter/datadog] Move validation to `Validate` * [exporter/datadog] Move some unmarshaling steps to `Unmarshal`; deprecate `Sanitize` * [exporter/datadog] Move endpoint override logic to `Unmarshal` * [exporter/datadog] Remove unnecessary calls to `Sanitize` * Fix changelog * Update deprecation version
Description:
Sanitize
toValidate
andUnmarshal
. In particular:Unmarshal
Validate
Unmarshal
Validate
andUnmarshal
.Sanitize
method. Its only use now is logging warnings, and it will be removed once we moveConfig
to the main package.This has a minor change on the Go API: right now if one passes a
Config
struct with an empty metrics or traces endpoint, the default one would have been populated bySanitize
. After this change, this results in an error. This does not affect end-users of the binary in any way. We can fix this on the future, depending on how the Go API usage evolves, since going from an error to not-an-error is not a breaking change.Link to tracking Issue: relates to #8373
Testing: Added more unit tests for validate and unmarshaling
Documentation: Updated
Sanitize
docs