Skip to content

[receiver/oracledb] Exclude collector's own queries from Top Query an…#47381

Open
harshitt13 wants to merge 2 commits intoopen-telemetry:mainfrom
harshitt13:fix/47366-oracledb-feedback-loop
Open

[receiver/oracledb] Exclude collector's own queries from Top Query an…#47381
harshitt13 wants to merge 2 commits intoopen-telemetry:mainfrom
harshitt13:fix/47366-oracledb-feedback-loop

Conversation

@harshitt13
Copy link
Copy Markdown

Description

This PR fixes an observability feedback loop in the oracledbreceiver where the collector's own monitoring queries appear in the collected data for Top Queries and Query Samples.

Changes made:

  • Renamed the query comment prefix in all SQL templates from /* otel-collector */ to /* otel-collector-ignore */.
  • Added a WHERE clause filter (AND <alias>.SQL_FULLTEXT NOT LIKE '/* otel-collector-ignore */%') to oracleQueryMetricsAndTextSql.tmpl and oracleQuerySampleSql.tmpl. This pushes the self-exclusion logic down to the database engine level.
  • Updated the prefix in oracleQueryPlanSql.tmpl (no WHERE clause filter needed here as it strictly queries by CHILD_ADDRESS values already filtered by the above queries).

Link to tracking issue

Fixes #47366

Testing

  • Verified template content generation.
  • Ran local unit tests: make --no-print-directory -C receiver/oracledbreceiver test (all 74 tests passed).
  • Ran local linters successfully.

Documentation

  • Generated a changelog entry via chloggen.

…d Query Sample collection

Resolves open-telemetry#47366

Signed-off-by: Harshit Kushwaha <find.harshitkushwaha@gmail.com>
@harshitt13 harshitt13 requested review from a team, atoulme, crobert-1 and dmitryax as code owners April 5, 2026 13:10
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Apr 5, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot added the first-time contributor PRs made by new contributors label Apr 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[receiver/oracledb] Exclude collector's own queries from Top Query and Query Sample collection

2 participants