Skip to content

Commit 83a6fbf

Browse files
fix: use oci.resourceName for OCIMYSQLDATABASE entity synthesis
The synthesis rule incorrectly referenced oci.resourceDisplayName which does not exist in the actual metric payload from oci-metric-streams. This caused entity synthesis to fail silently, resulting in entities with type NA in the GUID that never appear in the catalog. Changes: - definition.stg.yml: name field changed to oci.resourceName (matching other OCI entity definitions like autonomousdatabase and postgresql) - definition.stg.yml: goldenTags updated to only reference attributes that actually exist in metric data (oci.compartmentId, oci.region, oci.accountName) - tests/Metric.stg.json: updated to match real metric payload structure from oci-metric-streams collector Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6b8abe9 commit 83a6fbf

2 files changed

Lines changed: 14 additions & 17 deletions

File tree

entity-types/infra-ocimysqldatabase/definition.stg.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
domain: INFRA
22
type: OCIMYSQLDATABASE
33
goldenTags:
4-
- oci.availabilityDomain
54
- oci.compartmentId
6-
- oci.displayName
7-
- oci.lifecycleState
8-
- oci.subscriptionId
9-
- oci.mysqlVersion
10-
- oci.shapeName
5+
- oci.region
6+
- oci.accountName
117
configuration:
128
entityExpirationTime: DAILY
139
alertable: true
@@ -19,7 +15,7 @@ synthesis:
1915
rules:
2016
- ruleName: infra_ocimysqldatabase_oci_resourceId
2117
identifier: oci.resourceId
22-
name: oci.resourceDisplayName
18+
name: oci.resourceName
2319
legacyFeatures:
2420
overrideGuidType: true
2521
encodeIdentifierInGUID: true
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
[
22
{
3-
"oci.availabilityDomain": "AD-1",
4-
"oci.compartmentId": "ocid1.compartment.oc1..aaaaaaaabbbbbbccccccccdddddddeeeeeeefffffffgggggggghhhhhhhhiiiiiiiiijjjjjjjj",
5-
"oci.displayName": "Test MySQL DB System",
6-
"oci.lifecycleState": "ACTIVE",
7-
"oci.subscriptionId": "ocid1.subscription.oc1..exampleuniqueSubID",
3+
"oci.compartmentId": "ocid1.compartment.oc1..aaaaaaaay26rs4myciv3iobbuxil2k47akp2fexsv2bwurkvjkv6u7y7e25q",
84
"oci.namespace": "oci_mysql_database",
95
"oci.region": "us-ashburn-1",
10-
"oci.resourceId": "ocid1.mysqldbsystem.oc1.us-ashburn-1.aaaaaaaabbbbbbccccccccdddddddeeeeeeefffffffgggggggghhhhhhhhiiiiiiiiijjjjjjjj",
11-
"oci.resourceDisplayName": "test-mysql-db",
12-
"collector.name": "oci-monitor",
6+
"oci.resourceId": "ocid1.mysqldbsystem.oc1.iad.aaaaaaaaqcz5yw6puypl2vcdvk6dnf46qwiuohvywy64fkkud4cs5juyb3ga",
7+
"oci.resourceName": "test-user-1",
8+
"oci.resourceType": "mysql",
9+
"oci.accountId": "ocid1.tenancy.oc1..aaaaaaaaslaq5synueyzouxaimk3szzf66iw6od7xyiam5myn4lqhcsfu5fq",
10+
"oci.accountName": "oci_test_1",
11+
"collector.name": "oci-metric-streams",
1312
"instrumentation.provider": "oci",
1413
"metricName": "oci.mysql.database.cpuutilization",
15-
"newrelic.cloudIntegrations.integrationName": "OCI Monitor metrics",
16-
"newrelic.cloudIntegrations.providerAccountName": "oci-dev-all-metrics"
14+
"newrelic.cloudIntegrations.providerAccountId": "69877",
15+
"newrelic.cloudIntegrations.providerAccountName": "oci_test_1",
16+
"newrelic.cloudIntegrations.providerExternalId": "ocid1.tenancy.oc1..aaaaaaaaslaq5synueyzouxaimk3szzf66iw6od7xyiam5myn4lqhcsfu5fq",
17+
"newrelic.source": "metricAPI"
1718
}
1819
]

0 commit comments

Comments
 (0)