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

Add MeterAdapter support for .NET 8 static meter/instrument tags. #471

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PJB3005
Copy link

@PJB3005 PJB3005 commented Mar 22, 2024

These tags are set on the meter and/or instrument at creation time, and are automatically added to the measurements' labels.

This required a little bit of internal reworking of MeterAdapter so that the static label values are stored into the metric context. I re-organized the code of OnMeasurementRecorded to re-use code between the metric types better, as I had to move the label value pool fetch to be gotten AFTER the metric context.

Added a target framework for .NET 8, since we obviously need it for the new feature. I multi-targeted the tests to both .NET 7 and .NET 8 to make sure I didn't break anything.

Added these to the example and wrote tests for them too.

These tags are set on the meter and/or instrument at creation time, and are automatically added to the measurements' labels.

This required a little bit of internal reworking of MeterAdapter so that the static label values are stored into the metric context. I re-organized the code of OnMeasurementRecorded to re-use code between the metric types better, as I had to move the label value pool fetch to be gotten AFTER the metric context.

Added a target framework for .NET 8, since we obviously need it for the new feature. I multi-targeted the tests to both .NET 7 and .NET 8 to make sure I didn't break anything.

Added these to the example and wrote tests for them 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.

None yet

1 participant