Skip to content

Commit a9c2003

Browse files
committed
Update MeterTest expectations to include schema URL
The TelemetryConverter now correctly preserves schema URLs from protobuf data. The MeterTest files create meters with schema URL 'http://schema.org', so the test expectations need to be updated to match.
1 parent a416dcb commit a9c2003

File tree

10 files changed

+66
-0
lines changed
  • instrumentation/opentelemetry-api
    • opentelemetry-api-1.10/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_10/metrics
    • opentelemetry-api-1.15/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_15/metrics
    • opentelemetry-api-1.31/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_31/metrics
    • opentelemetry-api-1.32/javaagent/src
      • incubatorTest/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_32/incubator/metrics
      • test/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_32/metrics
    • opentelemetry-api-1.37/javaagent/src
      • incubatorTest/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_37/incubator/metrics
      • oldAndNewIncubatorTest/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_37/incubator/metrics
      • test/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_37/metrics
    • opentelemetry-api-1.38/javaagent/src
      • incubatorTest/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_38/incubator/metrics
      • test/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_38/metrics

10 files changed

+66
-0
lines changed

instrumentation/opentelemetry-api/opentelemetry-api-1.10/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_10/metrics/MeterTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ void longCounter() {
7272
.hasInstrumentationScope(
7373
InstrumentationScopeInfo.builder(instrumentationName)
7474
.setVersion("1.2.3")
75+
.setSchemaUrl("http://schema.org")
7576
.build())
7677
.hasLongSumSatisfying(
7778
sum ->
@@ -106,6 +107,7 @@ void observableLongCounter() throws InterruptedException {
106107
.hasInstrumentationScope(
107108
InstrumentationScopeInfo.builder(instrumentationName)
108109
.setVersion("1.2.3")
110+
.setSchemaUrl("http://schema.org")
109111
.build())
110112
.hasLongSumSatisfying(
111113
sum ->
@@ -147,6 +149,7 @@ void doubleCounter() {
147149
.hasInstrumentationScope(
148150
InstrumentationScopeInfo.builder(instrumentationName)
149151
.setVersion("1.2.3")
152+
.setSchemaUrl("http://schema.org")
150153
.build())
151154
.hasDoubleSumSatisfying(
152155
sum ->
@@ -182,6 +185,7 @@ void observableDoubleCounter() throws InterruptedException {
182185
.hasInstrumentationScope(
183186
InstrumentationScopeInfo.builder(instrumentationName)
184187
.setVersion("1.2.3")
188+
.setSchemaUrl("http://schema.org")
185189
.build())
186190
.hasDoubleSumSatisfying(
187191
sum ->
@@ -223,6 +227,7 @@ void longUpDownCounter() {
223227
.hasInstrumentationScope(
224228
InstrumentationScopeInfo.builder(instrumentationName)
225229
.setVersion("1.2.3")
230+
.setSchemaUrl("http://schema.org")
226231
.build())
227232
.hasLongSumSatisfying(
228233
sum ->
@@ -257,6 +262,7 @@ void observableLongUpDownCounter() throws InterruptedException {
257262
.hasInstrumentationScope(
258263
InstrumentationScopeInfo.builder(instrumentationName)
259264
.setVersion("1.2.3")
265+
.setSchemaUrl("http://schema.org")
260266
.build())
261267
.hasLongSumSatisfying(
262268
sum ->
@@ -298,6 +304,7 @@ void doubleUpDownCounter() {
298304
.hasInstrumentationScope(
299305
InstrumentationScopeInfo.builder(instrumentationName)
300306
.setVersion("1.2.3")
307+
.setSchemaUrl("http://schema.org")
301308
.build())
302309
.hasDoubleSumSatisfying(
303310
sum ->
@@ -333,6 +340,7 @@ void observableDoubleUpDownCounter() throws InterruptedException {
333340
.hasInstrumentationScope(
334341
InstrumentationScopeInfo.builder(instrumentationName)
335342
.setVersion("1.2.3")
343+
.setSchemaUrl("http://schema.org")
336344
.build())
337345
.hasDoubleSumSatisfying(
338346
sum ->
@@ -374,6 +382,7 @@ void longHistogram() {
374382
.hasInstrumentationScope(
375383
InstrumentationScopeInfo.builder(instrumentationName)
376384
.setVersion("1.2.3")
385+
.setSchemaUrl("http://schema.org")
377386
.build())
378387
.hasHistogramSatisfying(
379388
histogram ->
@@ -405,6 +414,7 @@ void doubleHistogram() {
405414
.hasInstrumentationScope(
406415
InstrumentationScopeInfo.builder(instrumentationName)
407416
.setVersion("1.2.3")
417+
.setSchemaUrl("http://schema.org")
408418
.build())
409419
.hasHistogramSatisfying(
410420
histogram ->
@@ -439,6 +449,7 @@ void longGauge() throws InterruptedException {
439449
.hasInstrumentationScope(
440450
InstrumentationScopeInfo.builder(instrumentationName)
441451
.setVersion("1.2.3")
452+
.setSchemaUrl("http://schema.org")
442453
.build())
443454
.hasLongGaugeSatisfying(
444455
gauge ->
@@ -481,6 +492,7 @@ void doubleGauge() throws InterruptedException {
481492
.hasInstrumentationScope(
482493
InstrumentationScopeInfo.builder(instrumentationName)
483494
.setVersion("1.2.3")
495+
.setSchemaUrl("http://schema.org")
484496
.build())
485497
.hasDoubleGaugeSatisfying(
486498
gauge ->

instrumentation/opentelemetry-api/opentelemetry-api-1.15/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_15/metrics/MeterTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ void batchLongCounter() throws InterruptedException {
6767
.hasInstrumentationScope(
6868
InstrumentationScopeInfo.builder(instrumentationName)
6969
.setVersion("1.2.3")
70+
.setSchemaUrl("http://schema.org")
7071
.build())
7172
.hasLongSumSatisfying(
7273
sum ->
@@ -112,6 +113,7 @@ void batchDoubleCounter() throws InterruptedException {
112113
.hasInstrumentationScope(
113114
InstrumentationScopeInfo.builder(instrumentationName)
114115
.setVersion("1.2.3")
116+
.setSchemaUrl("http://schema.org")
115117
.build())
116118
.hasDoubleSumSatisfying(
117119
sum ->
@@ -157,6 +159,7 @@ void batchLongUpDownCounter() throws InterruptedException {
157159
.hasInstrumentationScope(
158160
InstrumentationScopeInfo.builder(instrumentationName)
159161
.setVersion("1.2.3")
162+
.setSchemaUrl("http://schema.org")
160163
.build())
161164
.hasLongSumSatisfying(
162165
sum ->
@@ -207,6 +210,7 @@ void batchDoubleUpDownCounter() throws InterruptedException {
207210
.hasInstrumentationScope(
208211
InstrumentationScopeInfo.builder(instrumentationName)
209212
.setVersion("1.2.3")
213+
.setSchemaUrl("http://schema.org")
210214
.build())
211215
.hasDoubleSumSatisfying(
212216
sum ->
@@ -252,6 +256,7 @@ void batchLongGauge() throws InterruptedException {
252256
.hasInstrumentationScope(
253257
InstrumentationScopeInfo.builder(instrumentationName)
254258
.setVersion("1.2.3")
259+
.setSchemaUrl("http://schema.org")
255260
.build())
256261
.hasLongGaugeSatisfying(
257262
gauge ->
@@ -296,6 +301,7 @@ void batchDoubleGauge() throws InterruptedException {
296301
.hasInstrumentationScope(
297302
InstrumentationScopeInfo.builder(instrumentationName)
298303
.setVersion("1.2.3")
304+
.setSchemaUrl("http://schema.org")
299305
.build())
300306
.hasDoubleGaugeSatisfying(
301307
gauge ->

instrumentation/opentelemetry-api/opentelemetry-api-1.31/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_31/metrics/MeterTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ void longCounter() {
9191
.hasInstrumentationScope(
9292
InstrumentationScopeInfo.builder(instrumentationName)
9393
.setVersion("1.2.3")
94+
.setSchemaUrl("http://schema.org")
9495
.build())
9596
.hasLongSumSatisfying(
9697
sum ->
@@ -128,6 +129,7 @@ void doubleCounter() {
128129
.hasInstrumentationScope(
129130
InstrumentationScopeInfo.builder(instrumentationName)
130131
.setVersion("1.2.3")
132+
.setSchemaUrl("http://schema.org")
131133
.build())
132134
.hasDoubleSumSatisfying(
133135
sum ->
@@ -165,6 +167,7 @@ void longUpDownCounter() {
165167
.hasInstrumentationScope(
166168
InstrumentationScopeInfo.builder(instrumentationName)
167169
.setVersion("1.2.3")
170+
.setSchemaUrl("http://schema.org")
168171
.build())
169172
.hasLongSumSatisfying(
170173
sum ->
@@ -203,6 +206,7 @@ void doubleUpDownCounter() {
203206
.hasInstrumentationScope(
204207
InstrumentationScopeInfo.builder(instrumentationName)
205208
.setVersion("1.2.3")
209+
.setSchemaUrl("http://schema.org")
206210
.build())
207211
.hasDoubleSumSatisfying(
208212
sum ->
@@ -241,6 +245,7 @@ void longHistogram() {
241245
.hasInstrumentationScope(
242246
InstrumentationScopeInfo.builder(instrumentationName)
243247
.setVersion("1.2.3")
248+
.setSchemaUrl("http://schema.org")
244249
.build())
245250
.hasHistogramSatisfying(
246251
histogram ->
@@ -279,6 +284,7 @@ void doubleHistogram() {
279284
.hasInstrumentationScope(
280285
InstrumentationScopeInfo.builder(instrumentationName)
281286
.setVersion("1.2.3")
287+
.setSchemaUrl("http://schema.org")
282288
.build())
283289
.hasHistogramSatisfying(
284290
histogram ->
@@ -316,6 +322,7 @@ void longGauge() throws InterruptedException {
316322
.hasInstrumentationScope(
317323
InstrumentationScopeInfo.builder(instrumentationName)
318324
.setVersion("1.2.3")
325+
.setSchemaUrl("http://schema.org")
319326
.build())
320327
.hasLongGaugeSatisfying(
321328
gauge ->
@@ -360,6 +367,7 @@ void syncLongGauge() throws InterruptedException {
360367
.hasInstrumentationScope(
361368
InstrumentationScopeInfo.builder(instrumentationName)
362369
.setVersion("1.2.3")
370+
.setSchemaUrl("http://schema.org")
363371
.build())
364372
.hasLongGaugeSatisfying(
365373
gauge ->
@@ -403,6 +411,7 @@ void doubleGauge() throws InterruptedException {
403411
.hasInstrumentationScope(
404412
InstrumentationScopeInfo.builder(instrumentationName)
405413
.setVersion("1.2.3")
414+
.setSchemaUrl("http://schema.org")
406415
.build())
407416
.hasDoubleGaugeSatisfying(
408417
gauge ->
@@ -446,6 +455,7 @@ void syncDoubleGauge() throws InterruptedException {
446455
.hasInstrumentationScope(
447456
InstrumentationScopeInfo.builder(instrumentationName)
448457
.setVersion("1.2.3")
458+
.setSchemaUrl("http://schema.org")
449459
.build())
450460
.hasDoubleGaugeSatisfying(
451461
gauge ->

instrumentation/opentelemetry-api/opentelemetry-api-1.32/javaagent/src/incubatorTest/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_32/incubator/metrics/MeterTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ void longCounter() {
9191
.hasInstrumentationScope(
9292
InstrumentationScopeInfo.builder(instrumentationName)
9393
.setVersion("1.2.3")
94+
.setSchemaUrl("http://schema.org")
9495
.build())
9596
.hasLongSumSatisfying(
9697
sum ->
@@ -128,6 +129,7 @@ void doubleCounter() {
128129
.hasInstrumentationScope(
129130
InstrumentationScopeInfo.builder(instrumentationName)
130131
.setVersion("1.2.3")
132+
.setSchemaUrl("http://schema.org")
131133
.build())
132134
.hasDoubleSumSatisfying(
133135
sum ->
@@ -165,6 +167,7 @@ void longUpDownCounter() {
165167
.hasInstrumentationScope(
166168
InstrumentationScopeInfo.builder(instrumentationName)
167169
.setVersion("1.2.3")
170+
.setSchemaUrl("http://schema.org")
168171
.build())
169172
.hasLongSumSatisfying(
170173
sum ->
@@ -203,6 +206,7 @@ void doubleUpDownCounter() {
203206
.hasInstrumentationScope(
204207
InstrumentationScopeInfo.builder(instrumentationName)
205208
.setVersion("1.2.3")
209+
.setSchemaUrl("http://schema.org")
206210
.build())
207211
.hasDoubleSumSatisfying(
208212
sum ->
@@ -241,6 +245,7 @@ void longHistogram() {
241245
.hasInstrumentationScope(
242246
InstrumentationScopeInfo.builder(instrumentationName)
243247
.setVersion("1.2.3")
248+
.setSchemaUrl("http://schema.org")
244249
.build())
245250
.hasHistogramSatisfying(
246251
histogram ->
@@ -279,6 +284,7 @@ void doubleHistogram() {
279284
.hasInstrumentationScope(
280285
InstrumentationScopeInfo.builder(instrumentationName)
281286
.setVersion("1.2.3")
287+
.setSchemaUrl("http://schema.org")
282288
.build())
283289
.hasHistogramSatisfying(
284290
histogram ->
@@ -316,6 +322,7 @@ void longGauge() throws InterruptedException {
316322
.hasInstrumentationScope(
317323
InstrumentationScopeInfo.builder(instrumentationName)
318324
.setVersion("1.2.3")
325+
.setSchemaUrl("http://schema.org")
319326
.build())
320327
.hasLongGaugeSatisfying(
321328
gauge ->
@@ -360,6 +367,7 @@ void syncLongGauge() throws InterruptedException {
360367
.hasInstrumentationScope(
361368
InstrumentationScopeInfo.builder(instrumentationName)
362369
.setVersion("1.2.3")
370+
.setSchemaUrl("http://schema.org")
363371
.build())
364372
.hasLongGaugeSatisfying(
365373
gauge ->
@@ -403,6 +411,7 @@ void doubleGauge() throws InterruptedException {
403411
.hasInstrumentationScope(
404412
InstrumentationScopeInfo.builder(instrumentationName)
405413
.setVersion("1.2.3")
414+
.setSchemaUrl("http://schema.org")
406415
.build())
407416
.hasDoubleGaugeSatisfying(
408417
gauge ->
@@ -446,6 +455,7 @@ void syncDoubleGauge() throws InterruptedException {
446455
.hasInstrumentationScope(
447456
InstrumentationScopeInfo.builder(instrumentationName)
448457
.setVersion("1.2.3")
458+
.setSchemaUrl("http://schema.org")
449459
.build())
450460
.hasDoubleGaugeSatisfying(
451461
gauge ->

instrumentation/opentelemetry-api/opentelemetry-api-1.32/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_32/metrics/MeterTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ void longHistogram() {
7777
.hasInstrumentationScope(
7878
InstrumentationScopeInfo.builder(instrumentationName)
7979
.setVersion("1.2.3")
80+
.setSchemaUrl("http://schema.org")
8081
.build())
8182
.hasHistogramSatisfying(
8283
histogram ->
@@ -112,6 +113,7 @@ void doubleHistogram() {
112113
.hasInstrumentationScope(
113114
InstrumentationScopeInfo.builder(instrumentationName)
114115
.setVersion("1.2.3")
116+
.setSchemaUrl("http://schema.org")
115117
.build())
116118
.hasHistogramSatisfying(
117119
histogram ->

0 commit comments

Comments
 (0)