Skip to content

test(net-http): improve instrumentation coverage#2172

Open
mateenali66 wants to merge 2 commits intoopen-telemetry:mainfrom
mateenali66:mateen/fix-net-http-coverage-2160
Open

test(net-http): improve instrumentation coverage#2172
mateenali66 wants to merge 2 commits intoopen-telemetry:mainfrom
mateenali66:mateen/fix-net-http-coverage-2160

Conversation

@mateenali66
Copy link
Copy Markdown

@mateenali66 mateenali66 commented Apr 7, 2026

adds targeted unit tests for net_http helper and instrumentation config paths to improve coverage.

what's included:

  • new tests for HttpHelper method normalization, unknown methods, and url.template span naming
  • new tests for semconv selection (stable, dup, old) and split_path_and_query
  • no workflow override changes, i could not find a net_http specific override in the current workflows

refs #2160

@thompson-tomo
Copy link
Copy Markdown
Contributor

@mateenali66 thanks for this, the Workflow override is yet to have been merged into main. We will review and come back to you.

@mateenali66
Copy link
Copy Markdown
Author

sounds good, no rush. once the workflow override is merged i can pick up the remaining coverage issues too (httpx etc).

@thompson-tomo
Copy link
Copy Markdown
Contributor

thompson-tomo commented Apr 9, 2026

@mateenali66 could you take a look at the CI error:

/home/runner/work/opentelemetry-ruby-contrib/opentelemetry-ruby-contrib/instrumentation/net_http/test/opentelemetry/instrumentation/net/http/http_helper_test.rb:9:in 'Kernel#require_relative': cannot load such file -- /home/runner/work/opentelemetry-ruby-contrib/opentelemetry-ruby-contrib/instrumentation/lib/opentelemetry/instrumentation/net/http/http_helper (LoadError)

And also remove the extra new line from the end of both files to fix that ci issue.

@mateenali66 mateenali66 changed the title test(net_http): improve instrumentation coverage test(net-http): improve instrumentation coverage Apr 9, 2026
…teen Anjum <mateenali66@gmail.com>

Signed-off-by: Mateen Anjum <mateenali66@gmail.com>
remove trailing blank lines in net_http test files

Signed-off-by: Mateen Anjum <mateenali66@gmail.com>
@mateenali66 mateenali66 force-pushed the mateen/fix-net-http-coverage-2160 branch from 71861b1 to eee620c Compare April 9, 2026 06:41
@mateenali66
Copy link
Copy Markdown
Author

@thompson-tomo fixed both, require_relative paths corrected and trailing blank lines removed. also added missing sign-off on the second commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants