Skip to content

feat(mysqlnode-otel): Complete OpenTelemetry mysqlreceiver support in Staging#3034

Merged
bgalmesnr merged 3 commits into
newrelic:mainfrom
abhinav1602:feat/mysqlnode-otel-full-support
Jul 13, 2026
Merged

feat(mysqlnode-otel): Complete OpenTelemetry mysqlreceiver support in Staging#3034
bgalmesnr merged 3 commits into
newrelic:mainfrom
abhinav1602:feat/mysqlnode-otel-full-support

Conversation

@abhinav1602

Copy link
Copy Markdown
Contributor

Completes OpenTelemetry Collector mysqlreceiver support for the existing INFRA-MYSQLNODE entity. All changes are staging-only (.stg overrides) — production behavior is unchanged until a later promotion.

What changed

  • entity-types/infra-mysqlnode/definition.stg.yml (new — full staging override)
    • OTel metric rule: added server.address / server.port tags (used by the new relationship lookup).
    • Two new Log synthesis rules for query-performance events (event.name prefix db.server.) — one for OTel-contrib mysqlreceiver, one for the newrelic-forks nrmysqlreceiver. The otel.library.name condition disambiguates from other DB receivers that also emit db.server.*.
    • Metric + logs share the mysql.instance.endpoint identifier, so an instance is one entity regardless of signal.
  • golden_metrics.stg.yml — fixed bufferPoolDataPages facet (statekind); added OTel queries for connected/running threads, max used connections, buffer-pool pages; added OTel-only bufferPoolUsageBytes and uptime. Counter metrics stay newRelic-only (cumulative/monotonic can't take value functions cleanly). At the 10-metric schema cap.
  • opentelemetry_dashboard.stg.json — rebuilt single-page dashboard covering the receiver's default metrics plus a Query Performance section from the log events. Widgets on disabled-by-default metrics are labeled "requires enabling".
  • tests/Log.stg.json (new) — sample db.server.top_query / db.server.query_sample payloads matching the new log rules.
  • relationships/candidates/MYSQLNODE.stg.yml (new) — indexes MYSQLNODE entities by server.address + server.port (mirrors MSSQLDBINSTANCE).
  • relationships/synthesis/OTEL-APPLICATION-to-INFRA-MYSQLNODE.stg.yml (new)CALLS relationship from OTel-instrumented apps to the MySQL node via distributed-tracing spans (covers both db.system and db.system.name = mysql). The existing native-APM relationship is untouched.

All metric/attribute names verified against the receiver's metadata.yaml.

Validation

npm --prefix validator run check passes (schemas + synthesis rules + relationship rules).

⚠️ To confirm in staging: the server.address / server.port tags that the candidate lookup keys on are captured from telemetry, but the receiver's metadata.yaml lists only mysql.instance.endpoint as a resource attribute. Before promotion, verify these tags actually populate on the entity (via collector processor / real ingest); otherwise the OTEL-APP → MYSQLNODE relationship won't resolve.

entityBot
entityBot previously approved these changes Jul 9, 2026

@entityBot entityBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We don't think these changes require an API Review Board (ARB) review, so it is not required to merge this PR. Note that all API changes do require one: if you believe this PR needs an ARB review, please create the ticket and add the ARB:pending label. Reach #api-review-board in case of doubts.

@entityBot entityBot requested a review from a team July 9, 2026 20:33
@@ -0,0 +1,60 @@
relationships:
# OpenTelemetry-instrumented application -> MySQL node, from distributed tracing spans.

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.

Currently, we are only establishing synthesis relationships from Native APM to OpenTelemetry (OTel) DB receivers. Note that the Query Comments feature is exclusively supported by native APM agents.

For context on how these are mapped, you can refer to the existing synthesis rules and their tracking candidates for Oracle and MSSQL.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing out @spathlavath , removed the OTEL APM file.

abhinav1602 and others added 2 commits July 10, 2026 16:47
…datastore spans

Replace the OTLP-filtered OTEL-APPLICATION->MYSQLNODE rule with an
APM-APPLICATION->MYSQLNODE staging rule that resolves the MySQL node from
native-APM datastore distributed-tracing spans (db.system=mysql +
server.address/server.port) via the host+port candidate, mirroring
APM-APPLICATION-to-INFRA-MSSQLINSTANCE.stg.yml. Native APM is the source
that powers the Query Comments feature. Candidate and definition comments
updated accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@entityBot entityBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We don't think these changes require an API Review Board (ARB) review, so it is not required to merge this PR. Note that all API changes do require one: if you believe this PR needs an ARB review, please create the ticket and add the ARB:pending label. Reach #api-review-board in case of doubts.

@entityBot entityBot requested a review from a team July 10, 2026 13:16
@entityBot entityBot requested a review from a team July 13, 2026 06:17
@bgalmesnr bgalmesnr merged commit e92dca0 into newrelic:main Jul 13, 2026
4 checks passed
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.

5 participants