-
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
[receiver/datadog] Add initial support for metrics #33631
[receiver/datadog] Add initial support for metrics #33631
Conversation
Holding off on rebasing until the after the release |
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 is a great start, thank you! Let's wait until the release is done and see if we have further reviews until then.
@@ -109,3 +133,87 @@ func (ddr *datadogReceiver) handleTraces(w http.ResponseWriter, req *http.Reques | |||
_, _ = w.Write([]byte("OK")) | |||
|
|||
} | |||
|
|||
// handleV1Series handles the v1 series endpoint https://docs.datadoghq.com/api/latest/metrics/#submit-metrics | |||
func (ddr *datadogReceiver) handleV1Series(w http.ResponseWriter, req *http.Request) { |
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.
Perhaps not for this PR, but it might be a good idea to split the handlers in their own source file.
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.
Do you mean something like metrics_receiver.go
and traces_receiver.go
?
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.
That too, but what I had in mind was splitting the handlers themselves into separate files, keeping only references to them on the receiver code.
a005ecc
to
f73d2c9
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.
This looks like a great start.
@@ -109,3 +133,87 @@ func (ddr *datadogReceiver) handleTraces(w http.ResponseWriter, req *http.Reques | |||
_, _ = w.Write([]byte("OK")) | |||
|
|||
} | |||
|
|||
// handleV1Series handles the v1 series endpoint https://docs.datadoghq.com/api/latest/metrics/#submit-metrics | |||
func (ddr *datadogReceiver) handleV1Series(w http.ResponseWriter, req *http.Request) { |
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.
Do you mean something like metrics_receiver.go
and traces_receiver.go
?
c7dc27e
to
fbf713a
Compare
**Description**: This PR is a follow up to the former #33631 extending the existing tags translation structure. This will be required for the follow up PRs adding support for v1 and v2 series endpoints, service checks, as well as sketches. The full version of the code can be found in the cedwards/datadog-metrics-receiver-full branch, or in Grafana Alloy: https://github.com/grafana/alloy/tree/main/internal/etc/datadogreceiver **Link to tracking Issue:** #18278 **Testing**: Unit tests have been added. More thorough tests will be included in follow-up PRs as the remaining functionality is added. **Notes**: - Adding `[chore]` to the title of the PR because https://github.com/grafana/opentelemetry-collector-contrib/blob/ab4d726aaaa07aad702ff3b312a8e261f2b38021/.chloggen/datadogreceiver_metrics.yaml#L1-L27 already exists. --------- Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>
**Description:** This PR adds support for V1 series, as well as batches the metrics by resource, scope, and datapoint attributes. The batching code will also be required for future PRs which will add support for v2 series endpoints, service checks, and sketches. Follow up of #33631 and #33922. The full version of the code can be found in the `cedwards/datadog-metrics-receiver-full` branch, or in Grafana Alloy: https://github.com/grafana/alloy/tree/main/internal/etc/datadogreceiver **Link to tracking Issue:** #18278 **Testing:** Unit tests, as well as an end-to-end test, have been added. --------- Co-authored-by: Federico Torres <federico.sa.torres@gmail.com>
**Description:** This PR adds support for Datadog V2 series. Follow up of #33631 and #33957. The full version of the code can be found in the `cedwards/datadog-metrics-receiver-full` branch, or in Grafana Alloy: https://github.com/grafana/alloy/tree/main/internal/etc/datadogreceiver **Link to tracking Issue:** #18278 **Testing:** Unit tests, as well as an end-to-end test, have been added.
Description: This PR adds support for Datadog Service Checks. Follow up of #33631 , #33957 and #34180. The full version of the code can be found in the cedwards/datadog-metrics-receiver-full branch, or in Grafana Alloy: https://github.com/grafana/alloy/tree/main/internal/etc/datadogreceiver Link to tracking Issue: #18278 Testing: Unit tests, as well as an end-to-end test, have been added. --------- Signed-off-by: alexgreenbank <alex.greenbank@grafana.com> Co-authored-by: Carrie Edwards <edwrdscarrie@gmail.com> Co-authored-by: Juraci Paixão Kröhling <juraci@kroehling.de>
**Description:** This PR adds support for translating Datadog sketches into Exponential Histograms. Follow up of #33631, #33957 and #34180. The full version of the code can be found in the `cedwards/datadog-metrics-receiver-full` branch, or in Grafana Alloy: https://github.com/grafana/alloy/tree/main/internal/etc/datadogreceiver **Link to tracking Issue:** #18278 **Testing:** Unit tests, as well as an end-to-end test, have been added. --------- Signed-off-by: Federico Torres <federico.torres@grafana.com> Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com> Co-authored-by: Federico Torres <federico.sa.torres@gmail.com> Co-authored-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
…34180) **Description:** This PR adds support for Datadog V2 series. Follow up of open-telemetry#33631 and open-telemetry#33957. The full version of the code can be found in the `cedwards/datadog-metrics-receiver-full` branch, or in Grafana Alloy: https://github.com/grafana/alloy/tree/main/internal/etc/datadogreceiver **Link to tracking Issue:** open-telemetry#18278 **Testing:** Unit tests, as well as an end-to-end test, have been added.
…etry#34474) Description: This PR adds support for Datadog Service Checks. Follow up of open-telemetry#33631 , open-telemetry#33957 and open-telemetry#34180. The full version of the code can be found in the cedwards/datadog-metrics-receiver-full branch, or in Grafana Alloy: https://github.com/grafana/alloy/tree/main/internal/etc/datadogreceiver Link to tracking Issue: open-telemetry#18278 Testing: Unit tests, as well as an end-to-end test, have been added. --------- Signed-off-by: alexgreenbank <alex.greenbank@grafana.com> Co-authored-by: Carrie Edwards <edwrdscarrie@gmail.com> Co-authored-by: Juraci Paixão Kröhling <juraci@kroehling.de>
**Description:** This PR adds support for translating Datadog sketches into Exponential Histograms. Follow up of open-telemetry#33631, open-telemetry#33957 and open-telemetry#34180. The full version of the code can be found in the `cedwards/datadog-metrics-receiver-full` branch, or in Grafana Alloy: https://github.com/grafana/alloy/tree/main/internal/etc/datadogreceiver **Link to tracking Issue:** open-telemetry#18278 **Testing:** Unit tests, as well as an end-to-end test, have been added. --------- Signed-off-by: Federico Torres <federico.torres@grafana.com> Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com> Co-authored-by: Federico Torres <federico.sa.torres@gmail.com> Co-authored-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
…etry#34474) Description: This PR adds support for Datadog Service Checks. Follow up of open-telemetry#33631 , open-telemetry#33957 and open-telemetry#34180. The full version of the code can be found in the cedwards/datadog-metrics-receiver-full branch, or in Grafana Alloy: https://github.com/grafana/alloy/tree/main/internal/etc/datadogreceiver Link to tracking Issue: open-telemetry#18278 Testing: Unit tests, as well as an end-to-end test, have been added. --------- Signed-off-by: alexgreenbank <alex.greenbank@grafana.com> Co-authored-by: Carrie Edwards <edwrdscarrie@gmail.com> Co-authored-by: Juraci Paixão Kröhling <juraci@kroehling.de>
**Description:** This PR adds support for translating Datadog sketches into Exponential Histograms. Follow up of open-telemetry#33631, open-telemetry#33957 and open-telemetry#34180. The full version of the code can be found in the `cedwards/datadog-metrics-receiver-full` branch, or in Grafana Alloy: https://github.com/grafana/alloy/tree/main/internal/etc/datadogreceiver **Link to tracking Issue:** open-telemetry#18278 **Testing:** Unit tests, as well as an end-to-end test, have been added. --------- Signed-off-by: Federico Torres <federico.torres@grafana.com> Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com> Co-authored-by: Federico Torres <federico.sa.torres@gmail.com> Co-authored-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Description:
This PR adds the initial structure required to add support for metrics in the Datadog receiver. This is the first of several PRs which will add support for v1 and v2 series endpoints, service checks, as well as sketches.
The full version of the code can be found in the
cedwards/datadog-metrics-receiver-full
branch, or in Grafana Alloy: https://github.com/grafana/alloy/tree/main/internal/etc/datadogreceiverLink to tracking Issue:
#18278
Testing:
Unit tests have been added. More thorough tests will be included in follow-up PRs as the remaining functionality is added.
Documentation:
Updated README