Skip to content

Commit d21e78c

Browse files
feat: Promote IBM MQ OpenTelemetry synthesis from staging to production (#3022)
* feat: Promote IBM MQ OpenTelemetry synthesis from staging to production (NR-579402) Promote the tested OpenTelemetry (prometheusreceiver) synthesis rules and relationships for INFRA-IBMMQ_MANAGER and INFRA-IBMMQ_QUEUE from staging (.stg) overrides into their production definitions. - Fold the OTel synthesis rule into each production definition.yml alongside the existing nri-mq rules (guarded with instrumentation.provider present:false so the two pipelines never double-synthesize). nri identity (targetName:qmgr[:queue]) is unchanged, so existing entity GUIDs are preserved. - Add an OpenTelemetry Log matching rule to IBMMQ_MANAGER (modeled on infra-haproxyinstance + infra-kafkabroker) so filelog-forwarded logs attach to the queue manager entity instead of only the HOST. - Promote golden_metrics (dual prometheus + opentelemetry queries), the OTel dashboards, the queue summary_metrics, and test fixtures. - Promote INFRA-HOST-to-INFRA-IBMMQ_MANAGER (MEASURES). - Add the OpenTelemetry MANAGES path to INFRA-IBMMQ_MANAGER-to-INFRA-IBMMQ_QUEUE, keeping the existing nri-mq rule untouched. - Remove the now-redundant .stg override files. Assisted-by: Claude Opus 4.8 (1M context) * refactor(ibmmq): key OTel identity on host.id with target.name fallback In OTel data host.id == target.name, so switch the primary OTel identity to host.id and keep target.name only as a backup when host.id is absent. - Each OTel synthesis rule (manager metric, manager logs, queue metric) is now a primary rule keyed on host.id (host.id present: true) plus a *_fallback rule keyed on target.name (host.id present: false). The pair is mutually exclusive, so no entity is synthesized twice. host.id and target.name are both carried as tags on every rule. - MANAGER->QUEUE OTel relationship builds the source manager GUID from host.id:qmgr (primary) with a target.name:qmgr fallback, matching the new manager identity. - Test fixtures trimmed to one sample per rule; manager log samples moved to a dedicated tests/Log.json (filename-derived eventType). Assisted-by: Claude Opus 4.8 (1M context) * fix(ibmmq_manager): format 'Last Update' as HH:mm MM/dd/yyyy in dashboards Wrap the queue manager summary table's timestamp in toDateTime so the 'Last Update' column renders as a readable date instead of a raw epoch, in both the newrelic and opentelemetry dashboards. Assisted-by: Claude Opus 4.8 (1M context) * docs(ibmmq): shorten OTel rule/log comments Assisted-by: Claude Opus 4.8 (1M context) * refactor(ibmmq): rename rel to hostMeasuresOTelIbmMqManager Assisted-by: Claude Opus 4.8 (1M context)
1 parent 68bc344 commit d21e78c

20 files changed

Lines changed: 625 additions & 691 deletions

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

Lines changed: 0 additions & 118 deletions
This file was deleted.

entity-types/infra-ibmmq_manager/definition.yml

Lines changed: 204 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ type: IBMMQ_MANAGER
33

44
synthesis:
55
rules:
6-
- ruleName: infra_ibmmq_manager_composite
6+
# nri-mq rules: native identity = targetName:qmgr. OTel excluded via instrumentation.provider absent
7+
# so nri-mq and OpenTelemetry never double-synthesize the same queue manager.
8+
- ruleName: infra_ibmmq_manager_nri_1
79
compositeIdentifier:
810
separator: ":"
911
attributes:
@@ -15,10 +17,12 @@ synthesis:
1517
value: Metric
1618
- attribute: metricName
1719
prefix: ibmmq_qmgr
20+
- attribute: instrumentation.provider
21+
present: false
1822
tags:
1923
clusterName:
2024

21-
- ruleName: infra_ibmmq_manager_composite_2
25+
- ruleName: infra_ibmmq_manager_nri_2
2226
compositeIdentifier:
2327
separator: ":"
2428
attributes:
@@ -30,11 +34,12 @@ synthesis:
3034
value: Metric
3135
- attribute: metricName
3236
prefix: ibmmq_channel
33-
37+
- attribute: instrumentation.provider
38+
present: false
3439
tags:
3540
clusterName:
3641

37-
- ruleName: infra_ibmmq_manager_composite_3
42+
- ruleName: infra_ibmmq_manager_nri_3
3843
compositeIdentifier:
3944
separator: ":"
4045
attributes:
@@ -46,13 +51,207 @@ synthesis:
4651
value: Metric
4752
- attribute: metricName
4853
prefix: ibmmq_subscription
49-
54+
- attribute: instrumentation.provider
55+
present: false
5056
tags:
5157
clusterName:
5258

59+
# OpenTelemetry rule (Prometheus receiver): identity keyed on host.id (== target.name in OTel data).
60+
# target.name is the fallback when host.id is absent (see *_fallback); mutually exclusive via
61+
# host.id present true/false, so a queue manager is never synthesized twice.
62+
- ruleName: infra_ibmmq_manager_otel
63+
compositeIdentifier:
64+
separator: ":"
65+
attributes:
66+
- host.id
67+
- qmgr
68+
encodeIdentifierInGUID: true
69+
name: qmgr
70+
conditions:
71+
- attribute: eventType
72+
value: Metric
73+
- attribute: metricName
74+
prefix: ibmmq_qmgr
75+
- attribute: instrumentation.provider
76+
value: opentelemetry
77+
- attribute: otel.library.name
78+
value: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver
79+
- attribute: qmgr
80+
present: true
81+
- attribute: queue
82+
present: false
83+
- attribute: host.id
84+
present: true
85+
tags:
86+
qmgr:
87+
host.id:
88+
target.name:
89+
cluster.name:
90+
entityTagName: clusterName
91+
otel.library.name:
92+
entityTagName: instrumentation.name
93+
instrumentation.provider:
94+
server.address:
95+
ttl: P1D
96+
host.name:
97+
ttl: P1D
98+
k8s.pod.name:
99+
ttl: P1D
100+
k8s.node.name:
101+
ttl: P1D
102+
k8s.pod.uid:
103+
ttl: P1D
104+
k8s.namespace.name:
105+
ttl: P1D
106+
107+
# Backup metric rule: host.id absent, fall back to target.name for identity.
108+
- ruleName: infra_ibmmq_manager_otel_fallback
109+
compositeIdentifier:
110+
separator: ":"
111+
attributes:
112+
- target.name
113+
- qmgr
114+
encodeIdentifierInGUID: true
115+
name: qmgr
116+
conditions:
117+
- attribute: eventType
118+
value: Metric
119+
- attribute: metricName
120+
prefix: ibmmq_qmgr
121+
- attribute: instrumentation.provider
122+
value: opentelemetry
123+
- attribute: otel.library.name
124+
value: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver
125+
- attribute: qmgr
126+
present: true
127+
- attribute: queue
128+
present: false
129+
- attribute: host.id
130+
present: false
131+
- attribute: target.name
132+
present: true
133+
tags:
134+
qmgr:
135+
target.name:
136+
host.id:
137+
cluster.name:
138+
entityTagName: clusterName
139+
otel.library.name:
140+
entityTagName: instrumentation.name
141+
instrumentation.provider:
142+
server.address:
143+
ttl: P1D
144+
host.name:
145+
ttl: P1D
146+
k8s.pod.name:
147+
ttl: P1D
148+
k8s.node.name:
149+
ttl: P1D
150+
k8s.pod.uid:
151+
ttl: P1D
152+
k8s.namespace.name:
153+
ttl: P1D
154+
155+
# OpenTelemetry Log rule: attaches OTel Collector filelog logs to the queue manager entity
156+
# (without it they land on the HOST). Same host.id:qmgr identity as the metric rule; queue
157+
# absent keeps queue-scoped logs off the manager.
158+
- ruleName: infra_ibmmq_manager_otel_logs
159+
compositeIdentifier:
160+
separator: ":"
161+
attributes:
162+
- host.id
163+
- qmgr
164+
encodeIdentifierInGUID: true
165+
name: qmgr
166+
conditions:
167+
- attribute: eventType
168+
value: Log
169+
- attribute: newrelic.source
170+
value: api.logs.otlp
171+
- attribute: instrumentation.provider
172+
value: opentelemetry
173+
- attribute: host.id
174+
present: true
175+
- attribute: qmgr
176+
present: true
177+
- attribute: queue
178+
present: false
179+
tags:
180+
qmgr:
181+
host.id:
182+
target.name:
183+
cluster.name:
184+
entityTagName: clusterName
185+
instrumentation.provider:
186+
otel.library.name:
187+
entityTagName: instrumentation.name
188+
server.address:
189+
ttl: P1D
190+
host.name:
191+
ttl: P1D
192+
k8s.pod.name:
193+
ttl: P1D
194+
k8s.node.name:
195+
ttl: P1D
196+
k8s.pod.uid:
197+
ttl: P1D
198+
k8s.namespace.name:
199+
ttl: P1D
200+
201+
# Backup log rule: host.id absent, fall back to target.name for identity.
202+
- ruleName: infra_ibmmq_manager_otel_logs_fallback
203+
compositeIdentifier:
204+
separator: ":"
205+
attributes:
206+
- target.name
207+
- qmgr
208+
encodeIdentifierInGUID: true
209+
name: qmgr
210+
conditions:
211+
- attribute: eventType
212+
value: Log
213+
- attribute: newrelic.source
214+
value: api.logs.otlp
215+
- attribute: instrumentation.provider
216+
value: opentelemetry
217+
- attribute: host.id
218+
present: false
219+
- attribute: target.name
220+
present: true
221+
- attribute: qmgr
222+
present: true
223+
- attribute: queue
224+
present: false
225+
tags:
226+
qmgr:
227+
target.name:
228+
host.id:
229+
cluster.name:
230+
entityTagName: clusterName
231+
instrumentation.provider:
232+
otel.library.name:
233+
entityTagName: instrumentation.name
234+
server.address:
235+
ttl: P1D
236+
host.name:
237+
ttl: P1D
238+
k8s.pod.name:
239+
ttl: P1D
240+
k8s.node.name:
241+
ttl: P1D
242+
k8s.pod.uid:
243+
ttl: P1D
244+
k8s.namespace.name:
245+
ttl: P1D
246+
247+
goldenTags:
248+
- qmgr
249+
53250
dashboardTemplates:
54251
newRelic:
55252
template: newrelic_dashboard.json
253+
opentelemetry:
254+
template: opentelemetry_dashboard.json
56255

57256
configuration:
58257
entityExpirationTime: DAILY

0 commit comments

Comments
 (0)