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

otelhttp: Introduce internal wrapper package #5291

Closed
wants to merge 1 commit into from

Conversation

dmathieu
Copy link
Member

@dmathieu dmathieu commented Mar 18, 2024

I am looking into cleaning up the otelhttp package, with the end goal of having separate handlers/transports for metrics and traces. (with #2782 in mind).

This is the first PR towards that goal. It moves the bodyWrapper and respWriterWrapper into a wrapper package, with additionnal tests, so the utility structs can be used across a future transport and handler package.

@dmathieu dmathieu added the Skip Changelog Allow PR to succeed without requiring an addition to the CHANGELOG label Mar 18, 2024
@dmathieu dmathieu changed the title otelhttp: Introduce wrapper package otelhttp: Introduce internal wrapper package Mar 18, 2024
Copy link

codecov bot commented Mar 18, 2024

Codecov Report

Attention: Patch coverage is 90.56604% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 61.2%. Comparing base (6137d41) to head (6409b0f).

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #5291   +/-   ##
=====================================
  Coverage   61.2%   61.2%           
=====================================
  Files        185     186    +1     
  Lines      11207   11205    -2     
=====================================
  Hits        6865    6865           
+ Misses      4142    4140    -2     
  Partials     200     200           
Files Coverage Δ
...ntation/net/http/otelhttp/internal/wrapper/body.go 100.0% <100.0%> (ø)
.../http/otelhttp/internal/wrapper/response_writer.go 100.0% <100.0%> (ø)
instrumentation/net/http/otelhttp/transport.go 97.4% <100.0%> (ø)
instrumentation/net/http/otelhttp/handler.go 87.0% <80.0%> (-0.2%) ⬇️

@dmathieu dmathieu marked this pull request as ready for review March 18, 2024 13:59
@dmathieu dmathieu requested review from Aneurysm9 and a team as code owners March 18, 2024 13:59
@dashpole
Copy link
Contributor

I think we should consider waiting to do refactoring work until after we have updated to the stable semconv: #5092

@dmathieu
Copy link
Member Author

Closing for now. I'll bring this back once the semconv migration is done.

@dmathieu dmathieu closed this Apr 12, 2024
@dmathieu dmathieu deleted the wrapper-package branch April 12, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog Allow PR to succeed without requiring an addition to the CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants