Skip to content

Add support for Opensearch client span - #871

Merged
grcevski merged 2 commits into
open-telemetry:mainfrom
coralogix:pgn/opensearch
Nov 11, 2025
Merged

Add support for Opensearch client span#871
grcevski merged 2 commits into
open-telemetry:mainfrom
coralogix:pgn/opensearch

Conversation

@pinoOgni

@pinoOgni pinoOgni commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

This PR introduces support for Opensearch client span, continuing the work already done for Elasticsearch (#801 and #853)

Opensearch doesn't have an opentelemetry semconv, so I reused Elasticsearch's with the only difference being the db.system.name field.
Moreoveor, to avoid duplicating code, I rewrote the tests and the python testserver to make it generic.

Comment thread pkg/appolly/app/request/span.go Outdated
@codecov

codecov Bot commented Nov 6, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.10%. Comparing base (2bfa737) to head (64930c1).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/ebpf/common/http/elasticsearch.go 0.00% 13 Missing ⚠️
pkg/appolly/app/request/span.go 0.00% 1 Missing ⚠️
pkg/appolly/app/request/span_getters.go 0.00% 1 Missing ⚠️
pkg/export/otel/tracesgen/tracesgen.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #871      +/-   ##
==========================================
- Coverage   55.15%   55.10%   -0.05%     
==========================================
  Files         251      251              
  Lines       21481    21494      +13     
==========================================
- Hits        11847    11845       -2     
- Misses       8818     8832      +14     
- Partials      816      817       +1     
Flag Coverage Δ
integration-test 23.19% <0.00%> (-0.09%) ⬇️
integration-test-arm 0.00% <0.00%> (?)
integration-test-vm-${ARCH}-${KERNEL_VERSION} 0.00% <0.00%> (?)
k8s-integration-test 2.76% <0.00%> (-0.01%) ⬇️
oats-test 0.00% <0.00%> (ø)
unittests 46.23% <0.00%> (-0.03%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pinoOgni pinoOgni closed this Nov 6, 2025
@pinoOgni pinoOgni reopened this Nov 7, 2025

@mmat11 mmat11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

left some comments, CI is failing, probably a rebase is needed

Comment thread internal/test/integration/components/elasticsearch/main.py Outdated
Comment thread internal/test/integration/components/elasticsearch/main.py Outdated
Comment thread internal/test/integration/docker-compose-opensearch.yml Outdated
Comment thread internal/test/integration/test_python_opensearchclient.go Outdated
Comment thread internal/tools/tools.go Outdated
Comment thread pkg/appolly/app/request/span.go Outdated
Comment thread pkg/ebpf/common/http/elasticsearch.go Outdated
@pinoOgni
pinoOgni marked this pull request as ready for review November 7, 2025 15:18
@pinoOgni
pinoOgni requested a review from a team as a code owner November 7, 2025 15:18

@mmat11 mmat11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

left a couple more comments, lgtm!

Comment thread internal/test/integration/test_python_elasticsearchclient.go
Comment thread pkg/appolly/app/request/span_getters.go
Comment thread pkg/ebpf/common/http/elasticsearch.go Outdated
@pinoOgni
pinoOgni force-pushed the pgn/opensearch branch 2 times, most recently from 4aee72f to fb4aaab Compare November 7, 2025 16:44
@NimrodAvni78

Copy link
Copy Markdown
Contributor

Can we add a row for opensearch in devdocs/features.md?

@pinoOgni

pinoOgni commented Nov 7, 2025

Copy link
Copy Markdown
Contributor Author

Can we add a row for opensearch in devdocs/features.md?

Oh, sure!

Comment thread devdocs/features.md Outdated

@grcevski grcevski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Thanks for adding this! I'm good to merge, we can maybe just address Nimrod's last comment about 3.0.0+.

Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
@pinoOgni

Copy link
Copy Markdown
Contributor Author

LGTM! Thanks for adding this! I'm good to merge, we can maybe just address Nimrod's last comment about 3.0.0+.

Done! :)

@grcevski
grcevski merged commit dffad82 into open-telemetry:main Nov 11, 2025
52 checks passed
@MrAlias MrAlias added this to the v0.3.0 milestone Dec 3, 2025
@MrAlias MrAlias mentioned this pull request Dec 3, 2025
marctc pushed a commit to grafana/opentelemetry-ebpf-instrumentation that referenced this pull request Dec 9, 2025
@pinoOgni
pinoOgni deleted the pgn/opensearch branch February 22, 2026 11:39
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.

5 participants