Skip to content

[receiver/newrelicoraclereceiver] Add New Relic Oracle Database receiver#157

Open
spathlavath wants to merge 32 commits intonewrelic:mainfrom
newrelic-forks:feat/receiver/newrelicoraclereceiver
Open

[receiver/newrelicoraclereceiver] Add New Relic Oracle Database receiver#157
spathlavath wants to merge 32 commits intonewrelic:mainfrom
newrelic-forks:feat/receiver/newrelicoraclereceiver

Conversation

@spathlavath
Copy link

@spathlavath spathlavath commented Feb 6, 2026

Summary

This PR implements Query Performance Monitoring (QPM) capabilities for the New Relic Oracle receiver, along with extensive test coverage and APM-Database correlation features.

Key Features

Query Performance Monitoring

  • Interval-based averaging: Tracks query performance metrics over configurable intervals with automatic baseline calculation
  • Slow query detection: Identifies and monitors queries exceeding response time thresholds
  • Resource wait analysis: Decodes and categorizes SQL Server wait types for performance diagnostics

APM-Database Correlation

  • APM metadata cache: Correlates database queries with APM transactions using application context
  • SQL normalizer: Anonymizes and normalizes SQL queries for cross-language correlation
  • Query anonymizer: Strips sensitive data from queries while preserving structure for analysis
  • Query hash generation: Creates consistent hashes for query grouping and deduplication

Co-authored-by: tharun0064 tbalanagu@newrelic.com
Co-authored-by: spathlavath spathlavath@newrelic.com
Co-authored-by: sjyothi54 jsurampudi@newrelic.com
Co-authored-by: RamanaReddy8801 rreddy@newrelic.com

@spathlavath spathlavath requested a review from a team as a code owner February 6, 2026 12:07
@spathlavath spathlavath changed the title Add New Relic Oracle Database receiver [receiver/newrelicoraclereceiver] Add New Relic Oracle Database receiver Feb 6, 2026
@spathlavath spathlavath force-pushed the feat/receiver/newrelicoraclereceiver branch from db3f65d to 8a346b3 Compare February 6, 2026 14:12
@spathlavath spathlavath requested review from a team as code owners March 10, 2026 15:46
spathlavath and others added 25 commits March 17, 2026 15:28
This receiver provides comprehensive Oracle monitoring capabilities including tablespace monitoring, SQL query performance tracking, wait event monitoring, and support for Oracle 12c through 23ai.
Co-authored-by: tharun0064 <tbalanagu@newrelic.com>
Co-authored-by: spathlavath <spathlavath@newrelic.com>
Co-authored-by: sjyothi54 <jsurampudi@newrelic.com>
Co-authored-by: RamanaReddy8801 <rreddy@newrelic.com>
* fix workflow checks

* remove unused functions

* update go version
* Consistent Format: All database timestamps now use the same format string from Oracle
No Conversions: No Go-side time parsing/formatting = no timezone issues
Type Safety: Compile-time checking ensures correct string usage
Backward Compatible: NRDB receives the same string format it always did
Simpler Code: Removed FormatTimestamp() calls = less complexity

The execution plan cache key bug was separate from timestamp changes:

Before: cacheKey = PlanHash + ChildNumber → Collision when PlanHash empty
After: cacheKey = SQLID + ChildNumber → No collision possible

* Metadata.yaml synchronized with generated code

* Removed final_blocker_query_text from wait_events metric

* updated wait events scraper

* fix cache logic

* .

* lint issue fixes

---------

Co-authored-by: tharun0064 <tbalanagu@newrelic.com>
…com/open-telemetry/opentelemetry-collector-contrib/receiver/newrelicoraclereceiver (#10)
…ow queries (#12)

* feat(oracle-receiver): Decouple Active running queries & Completed slow queries

* fixed ExtractNewRelicMetadata bug

* updated defaults

* Added debug logs

* changed Debug to Info

* Updated SQL normalizer logic

* Removed Debug logs
* Mandatoy UI metrics

* response time threshold
* feat: improve active-session coverage and deduplication in QPM

Two-call approach with correct deduplication:
- Call 1 (GetSlowQuerySessionsSQL): fetches sessions running Phase 1
  slow-query sql_ids; no FETCH FIRST since the IN (...) clause already
  bounds results and a row cap would silently drop slow-query sessions.
- Call 2 (GetWaitEventsAndBlockingSQL): fetches top-N general active
  sessions ordered by wait/CPU time; FETCH FIRST N applied here only.

Configurable active_query_count_threshold:
- New YAML field active_query_count_threshold controls the FETCH FIRST N
  row limit for Call 2 (default 50, valid range 20–50);
- SetDefaults() auto-corrects out-of-range values to the default.

* optimized query for fetch wait events

---------

Co-authored-by: tharun0064 <tbalanagu@newrelic.com>
tharun0064 and others added 7 commits March 17, 2026 15:28
- exporter/nopexporter: bump go.opentelemetry.io/otel/sdk v1.39.0 -> v1.40.0 (CVE-2026-24051)
- internal/coreinternal: bump go.opentelemetry.io/otel/sdk v1.39.0 -> v1.40.0 (CVE-2026-24051)
- processor/adaptivetelemetryprocessor: bump go.opentelemetry.io/otel/sdk v1.39.0 -> v1.40.0 (CVE-2026-24051)
- receiver/nopreceiver: bump go.opentelemetry.io/otel/sdk v1.39.0 -> v1.40.0 (CVE-2026-24051)
- testbed: bump go.opentelemetry.io/otel/sdk v1.39.0 -> v1.40.0 (CVE-2026-24051)
- internal/tools: bump github.com/cloudflare/circl v1.6.1 -> v1.6.3 (CVE-2026-1229)
- internal/tools: bump github.com/go-git/go-git/v5 v5.16.3 -> v5.16.5 (CVE-2026-25934)

CVE-2026-24051: OpenTelemetry Go SDK arbitrary code execution via PATH hijacking
CVE-2026-1229: CIRCL incorrect calculation in secp384r1 CombinedMult
CVE-2026-25934: go-git data integrity issue due to improper pack verification
@spathlavath spathlavath force-pushed the feat/receiver/newrelicoraclereceiver branch from 1b695b0 to ed66712 Compare March 17, 2026 10:04
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.

4 participants