Skip to content

Updated DB rules for oracle, mysql, mssql and postgres - #3264

Merged
vlopeziglesias merged 22 commits into
newrelic:mainfrom
sjyothi54:db-staging-prod
Sep 30, 2026
Merged

vlopeziglesias merged 22 commits into
newrelic:mainfrom
sjyothi54:db-staging-prod

Conversation

@sjyothi54

@sjyothi54 sjyothi54 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Relevant information

Rolls out server.address/server.port to prod as the entity identifier for ORACLEDBINSTANCE, MYSQLNODE, POSTGRESQLINSTANCE, and MSSQLINSTANCE, with each DB type falling back to its existing legacy identifier for customers still on older receiver binaries. This keeps entity creation consistent across old and new binary versions.

ARB Jira ticket:
https://new-relic.atlassian.net/browse/NR-624118

Checklist

  • I've read the guidelines and understand the acceptance criteria.
  • The value of the attribute marked as identifier will be unique and valid.
  • I've confirmed that my entity type wasn't already defined. If it is I'm providing an explanation above.
  • I've linked an ARB ticket & received approval from API Review Board in order to make these changes

@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.

beep boop bop.

I have found some errors processing these changes:

  • No valid, approved ARB ticket found in the PR description. This PR has to be reviewed by the API Review Board, please include a link to the ticket of that review in the PR description. Check how to start the process here or reach #api-review-board channel in case of doubts

@entityBot
entityBot requested a review from a team September 25, 2026 10:45
tharun0064
tharun0064 previously approved these changes Sep 25, 2026
@entityBot
entityBot requested a review from a team September 25, 2026 11:12
spathlavath and others added 7 commits September 25, 2026 17:10
…ss/port missing

The metric, log, and DbServer-prefixed synthesis rules for INFRA-MYSQLNODE
identify/name by a server.address:server.port composite. mysqlreceiver
builds without the useOTelSemconv gate don't emit those attributes, only
the derived mysql.instance.endpoint, so those entities would go
unsynthesized.

Guards the composite rules with server.address/server.port present:true,
and adds a fallback rule per event path (metric, log, DbServer) that
matches when server.address is absent and identifies/names by the older
mysql.instance.endpoint attribute instead. Staging and prod.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…RSP pipeline rules

- Add sqlserver.target.host present:false to nrfork fallback metric rule
- Add nrfork log rules with sqlserver.target.host composite identifier
- Add NRSP db_server_events rules (host.name, service.instance.id, composite)
- Add sqlqueryreceiver composite identifier rule
- Remove generic sqlserverreceiver log/metric rules from prod
@sjyothi54 sjyothi54 changed the title Updated DB rules for oracle, mysql and postgres Updated DB rules for oracle, mysql, mssql and postgres Sep 28, 2026
gdivya-nr and others added 2 commits September 28, 2026 13:58
…allback

fix(mysqlnode): fallback to mysql.instance.endpoint when server.address/port missing
@entityBot
entityBot dismissed stale reviews from tharun0064 and themself September 28, 2026 08:49

Dismissing reviews

@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.

beep boop bop.

I have found some errors processing these changes:

  • No valid, approved ARB ticket found in the PR description. This PR has to be reviewed by the API Review Board, please include a link to the ticket of that review in the PR description. Check how to start the process here or reach #api-review-board channel in case of doubts

@entityBot
entityBot requested review from a team and removed request for a team September 28, 2026 08:49
feat(mssql): Update Staging rules to Prod env
@entityBot
entityBot dismissed their stale review September 28, 2026 08:59

Let's validate those changes.

@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.

beep boop bop.

I have found some errors processing these changes:

  • No valid, approved ARB ticket found in the PR description. This PR has to be reviewed by the API Review Board, please include a link to the ticket of that review in the PR description. Check how to start the process here or reach #api-review-board channel in case of doubts

fix(postgresqlinstance): guard server.address/port composite rules, add stg upstream fallback
@entityBot
entityBot dismissed their stale review September 28, 2026 12:31

Let's validate those changes.

@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.

beep boop bop.

I have found some errors processing these changes:

  • ARB tickets not approved: NR-624118 (Status: Backlog).
    The review process is not handled by Entity Platform, reach #api-review-board channel in case of doubts

field: hostAddress
- tagKeys: ["host.port"]
field: hostPort
- tagKeys: ["server.address"]

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.

Are you sure this is working for old oracle binaries? The rule infra_oracledbinstance_host_name_nrfork does not generate server.x

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.

@sseif-nr The relation can be established using the shared endpoint tag, see relationships/synthesis/APM-APPLICATION-to-DATABASE.yml's apmCallsGenericDatabase rule, which matches Oracle Datastore metrics via the generic DATABASE candidate category on the endpoint tag key, so both old-binary (host.address) and new-binary (server.address) entities remain reachable there. As a manual fallback, tags can also be added directly to an entity to satisfy a candidate match if needed.

entityTagName: instrumentation.name
otel.library.version:
entityTagName: instrumentation.version
server.address:

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.

Line 66 states that this attribute cannot be present.

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.

@sseif-nr Removed these tags as those are not being used

spathlavath
spathlavath previously approved these changes Sep 28, 2026

@spathlavath spathlavath 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

@entityBot
entityBot dismissed stale reviews from abhinav1602 and spathlavath September 29, 2026 08:47

Dismissing reviews

@entityBot
entityBot requested review from a team and removed request for a team September 29, 2026 08:47
abhinav1602
abhinav1602 previously approved these changes Sep 29, 2026
@entityBot
entityBot requested a review from a team September 29, 2026 08:48
spathlavath
spathlavath previously approved these changes Sep 29, 2026
@sseif-nr

Copy link
Copy Markdown
Collaborator

No concerns from the API side with it. The final ack needs to come from an EP engineer to assert technical sanity.

@sjyothi54

sjyothi54 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor Author

No concerns from the API side with it. The final ack needs to come from an EP engineer to assert technical sanity.

@sseif-nr In that case, would you approve this PR. so we can move forward with EP team

@entityBot
entityBot dismissed stale reviews from abhinav1602 and spathlavath September 30, 2026 09:06

Dismissing reviews

@entityBot
entityBot requested review from a team and removed request for a team September 30, 2026 09:06
@entityBot
entityBot requested a review from a team September 30, 2026 09:07
@vlopeziglesias
vlopeziglesias merged commit 3af9c51 into newrelic:main Sep 30, 2026
3 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.

8 participants