Skip to content
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

[chore] Add metrics around the DataPoints received by the InfluxDB receiver #24044

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

tj---
Copy link
Contributor

@tj--- tj--- commented Jul 8, 2023

Description: Receiver metrics will now be reported for the InfluxDB receiver (The implementation of reporting the metrics is similar to that of Kafka Receiver) - this includes accepted and refused data points.
The receiver {label, value} pair will be receiver="influxdb"

Link to tracking Issue: #23389

Testing: Did not add any new unit tests. Observed that the metrics were being collected by running the binary locally

# HELP cdm_otelcol_receiver_accepted_metric_points Number of metric points successfully pushed into the pipeline.
# TYPE cdm_otelcol_receiver_accepted_metric_points counter
cdm_otelcol_receiver_accepted_metric_points{instance="0.0.0.0:8888",job="prometheus_simple/0.0.0.0:8888",receiver="influxdb",service_instance_id="4e4459b0-125e-4f84-883c-80cb933d86f3",service_name="otelcontribcol",service_version="0.80.0-dev",transport="http"} 979
# HELP cdm_otelcol_receiver_refused_metric_points Number of metric points that could not be pushed into the pipeline.
# TYPE cdm_otelcol_receiver_refused_metric_points counter
cdm_otelcol_receiver_refused_metric_points{instance="0.0.0.0:8888",job="prometheus_simple/0.0.0.0:8888",receiver="influxdb",service_instance_id="4e4459b0-125e-4f84-883c-80cb933d86f3",service_name="otelcontribcol",service_version="0.80.0-dev",transport="http"} 0

Documentation: This is already documented in the service section of the collector configuration.

@tj--- tj--- requested a review from a team as a code owner July 8, 2023 14:38
@tj--- tj--- requested a review from djaglowski July 8, 2023 14:38
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 8, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Contributor

@jacobmarble jacobmarble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@@ -165,7 +181,9 @@ func (r *metricsReceiver) handleWrite(w http.ResponseWriter, req *http.Request)
}
}

if err := r.nextConsumer.ConsumeMetrics(req.Context(), batch.GetMetrics()); err != nil {
err := r.nextConsumer.ConsumeMetrics(req.Context(), batch.GetMetrics())
r.obsrecv.EndMetricsOp(ctx, "influxdb", batch.GetMetrics().DataPointCount(), err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a good idea to put "influxdb" in a string constant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@tj---
Copy link
Contributor Author

tj--- commented Jul 9, 2023

Thank you for the review. Can I request this PR to be merged?

@codeboten codeboten merged commit 96c78dc into open-telemetry:main Jul 10, 2023
89 checks passed
@github-actions github-actions bot added this to the next release milestone Jul 10, 2023
@tj--- tj--- deleted the infludb_observability branch July 11, 2023 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants