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

refactor(instrumentation-http): replace SpanAttributes and MetricAttributes with Attributes #5023

Conversation

david-luna
Copy link
Contributor

Which problem is this PR solving?

Replaces SpanAttributes and MetricsAttributes with Attributes. Mote this is not marked as a breaking change since @opentelemetry/api dependency is already at v1.3.0 and types do not break.

Refs #4175

Type of change

Please delete options that are not relevant.

  • refactor

How Has This Been Tested?

compile and ran the test suite for instrumentation

Checklist:

  • Followed the style guidelines of this project

@david-luna david-luna requested a review from a team as a code owner September 27, 2024 10:15
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.94%. Comparing base (f8ab559) to head (ea174b5).
Report is 22 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5023      +/-   ##
==========================================
+ Coverage   93.39%   93.94%   +0.54%     
==========================================
  Files          46      310     +264     
  Lines         712     8138    +7426     
  Branches      120     1633    +1513     
==========================================
+ Hits          665     7645    +6980     
- Misses         47      493     +446     

see 266 files with indirect coverage changes

@@ -331,7 +331,7 @@ export class HttpInstrumentation extends InstrumentationBase<HttpInstrumentation
request: http.ClientRequest,
span: Span,
startTime: HrTime,
metricAttributes: MetricAttributes
metricAttributes: Attributes
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wonder if we also need to change param names. But I think that would make it a breaking change.

Copy link
Member

Choose a reason for hiding this comment

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

ah, I think that's fine here. The name here is actually helping us understand that the attributes here are intended for the metric data point. 🙂

Copy link
Member

@pichlermarc pichlermarc left a comment

Choose a reason for hiding this comment

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

thanks 🙂

@pichlermarc pichlermarc added this pull request to the merge queue Sep 27, 2024
Merged via the queue into open-telemetry:main with commit d1cd7f2 Sep 27, 2024
21 checks passed
@david-luna david-luna deleted the dluna/4175-replace-sattrib-interfaces-http-instr branch September 27, 2024 11:15
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