Fix up some of the open telemetry issues #8650
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request primarily focuses on enhancing the OpenTelemetry integration within the Dependabot system, with changes spanning across multiple files. The main changes include the addition of
shutdown
andforce_flush
methods to theTracerProvider
class, ensuring the shutdown of the OpenTelemetry exporter in therun
method, and renaming the spans inperform_job
methods while also setting the attribute forJOB_ID
.Changes to Dependabot's OpenTelemetry usage:
updater/lib/dependabot/base_command.rb
: Ensured the shutdown of the OpenTelemetry exporter in therun
method. This ensures that the OpenTelemetry system is properly closed when the run method finishes execution.updater/lib/dependabot/opentelemetry.rb
: Added ashutdown
method to theOpenTelemetry
class in Dependabot. This method invokes theforce_flush
andshutdown
methods on thetracer_provider
of OpenTelemetry if it should be configured.Changes to OpenTelemetry spans:
updater/lib/dependabot/file_fetcher_command.rb
andupdater/lib/dependabot/update_files_command.rb
: Renamed the spans inperform_job
methods from "perform_job" to "file_fetcher" and "update_files" respectively. Also, set the attribute forJOB_ID
on the span. This provides more specific information about the job being performed in the telemetry data. [1] [2]