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

gradually add metrics capabilities to Instrumentation::Base #1324

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zvkemp
Copy link

@zvkemp zvkemp commented Jan 7, 2025

[description WIP; still amending commits]

TODO:

  • FIXME: decide what (if anything) to return if Metrics is undefined
  • FIXME should instruments not declared in advance return a valid instrument anyway?
  • ensure instrument opts are forwarded correctly, or validate them when they are declared
  • dependency load order is very important here; if the Metrics API isn't loaded before Instrumentation::Base, the conditional definitions are not run. We either need to hook into Kernel.require and detect when Metrics is loaded (probably too perilous to really consider, as any instrumentations with conditional metrics will need to be re-evaluated at this time), or eagerly attempt to require the metrics-api gem when Instrumentation::Base is loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant