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

fix: Remove Metrics OTLP exporter Util#measure_request_duration and duplicate files #1717

Merged
merged 5 commits into from
Sep 4, 2024

Conversation

kaylareopelle
Copy link
Contributor

@kaylareopelle kaylareopelle commented Sep 4, 2024

While investigating the recent Rubocop failures, I learned two things:

  1. We don't need measure_request_duration in the metrics OTLP exporter because we don't use the metrics reporter.
  2. There are two Util files because the files in the old path (exporter/otlp/*) still existed (we now use exporter/otlp/metrics/*).

Both of these issues are fixed in this PR.

The OTLP metrics exporter does not use the metrics reporter present in
the traces OTLP exporter. The measure_request_duration method is used
in the traces exporter to provide a value for the metrics reporter.
Since the metrics OTLP exporter does not use this metrics reporter,
the method is not needed.

Also, with the current code, the duration was being calculated in a void
context. The value of the response variable has been and should be
the result of @http.request(request).
There were some duplicate files at the path exporter/otlp/* that
were no longer used, now that the files are nested under
exporter/otlp/metrics/*

The test file location was updated to reflect the new location.
@kaylareopelle kaylareopelle changed the title fix: Remove Metrics OTLP exporter Util#measure_request_duration fix: Remove Metrics OTLP exporter Util#measure_request_duration and duplicate files Sep 4, 2024
@kaylareopelle kaylareopelle changed the title fix: Remove Metrics OTLP exporter Util#measure_request_duration and duplicate files fix: Remove Metrics OTLP exporter Util#measure_request_duration and duplicate files from old nesting structure Sep 4, 2024
@kaylareopelle kaylareopelle changed the title fix: Remove Metrics OTLP exporter Util#measure_request_duration and duplicate files from old nesting structure fix: Remove Metrics OTLP exporter Util#measure_request_duration and duplicate files Sep 4, 2024
@mwear mwear merged commit 0f5cbfc into open-telemetry:main Sep 4, 2024
60 checks passed
@kaylareopelle kaylareopelle deleted the metrics-rubocop-fix branch September 4, 2024 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants