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

feat: Custom instrumentation supportability metrics #2797

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

chynesNR
Copy link
Member

@chynesNR chynesNR commented Oct 3, 2024

No description provided.

private const string SupportabilityCustomInstrumentationPs = SupportabilityPs + "CustomInst" + PathSeparator;
public static string GetSupportabilityCustomInstrumentation(string assemblyName, string className, string method)
{
return SupportabilityCustomInstrumentationPs + assemblyName + PathSeparator + className + PathSeparator + method;
Copy link
Member

Choose a reason for hiding this comment

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

I assume this is what you were referring to when you mentioned the metric name is quite long? I wonder if we have an upper limit on the length of metric names? I don't have any good suggesions, though, for how you could make this any shorter and yet still be descriptive.

Copy link
Member Author

Choose a reason for hiding this comment

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

Exactly, here's one from our integration tests: Supportability/CustomInst/DistributedTracingApiApplication/NewRelic.Agent.IntegrationTests.Applications.DistributedTracingApiApplication.Program/CallInsertDTHeaders
I think having the full class name would help with identifying things we want to instrument, but they are quite long. The spec says the limit is 255 bytes for a single metric, and 1MB for the payload. Most customers should only have a few custom instrumentation points (or usually none), so maybe it's ok.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 96.96970% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.27%. Comparing base (7c241f8) to head (b48bdb4).

Files with missing lines Patch % Lines
...gent/NewRelic/Agent/Core/Wrapper/WrapperService.cs 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2797      +/-   ##
==========================================
+ Coverage   81.21%   81.27%   +0.06%     
==========================================
  Files         460      460              
  Lines       29219    29249      +30     
  Branches     3223     3225       +2     
==========================================
+ Hits        23731    23773      +42     
+ Misses       4701     4692       -9     
+ Partials      787      784       -3     
Flag Coverage Δ
Agent 82.30% <96.96%> (+0.06%) ⬆️
Profiler 72.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...elic/Agent/Core/AgentHealth/AgentHealthReporter.cs 87.10% <100.00%> (+0.07%) ⬆️
...c/Agent/NewRelic/Agent/Core/Metrics/MetricNames.cs 91.92% <100.00%> (+0.06%) ⬆️
.../NewRelic/Agent/Core/WireModels/MetricWireModel.cs 96.71% <100.00%> (+0.02%) ⬆️
...gent/NewRelic/Agent/Core/Wrapper/WrapperService.cs 79.88% <95.45%> (+5.04%) ⬆️

... and 1 file with indirect coverage changes

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.

3 participants