Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd83b4a913
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| return INSTANCE; | ||
| } | ||
|
|
||
| public void recordSpiDetected(String spiFqn, String source) { |
There was a problem hiding this comment.
Enqueue SPI detections before draining
In any runtime where OTel SPI providers are present, this metric will still never be emitted: I checked repo-wide (rg recordSpiDetected) and the only callers are the new tests, so the telemetry action drains an always-empty queue. Please wire the SPI discovery/loading path to call this method before enabling the periodic action.
Useful? React with 👍 / 👎.
| if (telemetryMetricsEnabled) { | ||
| actions.add(new CoreMetricsPeriodicAction()); | ||
| actions.add(new OtelEnvMetricPeriodicAction()); | ||
| actions.add(new OtelSpiMetricPeriodicAction()); |
There was a problem hiding this comment.
Maybe gate this on InstrumenterConfig.get().getTraceExtensionsPath() being non-null
If the extensions path is not set then we know we'll never be receiving any SPI metrics to export.
What Does This Do
With the end goal to track which SPIs are used frequently with dd-trace-java, this PR introduces the skeleton needed to report this metrics. Notable tags are
spi_classandsource.Motivation
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]
Note: Once your PR is ready to merge, add it to the merge queue by commenting
/merge./merge -ccancels the queue request./merge -f --reason "reason"skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.