Skip to content

Allow embedders flexibility in how they register their metrics - #3663

Open
rylev wants to merge 1 commit into
mainfrom
flexible-metrics-registration
Open

Allow embedders flexibility in how they register their metrics#3663
rylev wants to merge 1 commit into
mainfrom
flexible-metrics-registration

Conversation

@rylev

@rylev rylev commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Exposes metrics_provider so that the embedders can modify and and ultimately register through set_meter_provider in the way they see fit.

Signed-off-by: Ryan Levick <rlevick@akamai.com>
@rylev
rylev requested a review from itowlson August 14, 2026 14:47
@itowlson
itowlson requested a review from calebschoepp August 16, 2026 19:28

@itowlson itowlson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I had one question but basically this looks fine as far as I know, but I would really like it if Caleb could take a look. If he doesn't have bandwidth then I'm happy to merge it.

spin_version: String,
///
/// Exposed publicly so embedders that manage their own [tracing::Subscriber] (and so can't call
/// [`crate::init`], which also installs one) can still set up Spin's metrics: build a provider

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This made me wonder if crate::init should be offering more flexibility to consumers (with the CLI defaults hived off to an init_default kind of function). But I'm not familiar with the telemetry subsystem so I'm fine with this less invasive change! But I'd like @calebschoepp to look it over too.

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.

2 participants