Skip to content

Commit 7ad3325

Browse files
authored
fix: template for telemetry schema URL (#3310)
1 parent 09b5ac5 commit 7ad3325

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

docs/metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ use opentelemetry::KeyValue;
7676

7777
let scope = InstrumentationScope::builder("my_company.my_product.my_library")
7878
.with_version("0.17")
79-
.with_schema_url("https://opentelemetry.io/schema/1.2.0")
79+
.with_schema_url("https://opentelemetry.io/schemas/1.2.0")
8080
.with_attributes([KeyValue::new("key", "value")])
8181
.build();
8282

opentelemetry-prometheus/tests/integration_test.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ fn prometheus_exporter_integration() {
379379

380380
let scope = InstrumentationScope::builder("testmeter")
381381
.with_version("v0.1.0")
382-
.with_schema_url("https://opentelemetry.io/schema/1.0.0")
382+
.with_schema_url("https://opentelemetry.io/schemas/1.0.0")
383383
.with_attributes(vec![KeyValue::new("k", "v")])
384384
.build();
385385

@@ -437,7 +437,7 @@ fn multiple_scopes() {
437437

438438
let scope_foo = InstrumentationScope::builder("meterfoo")
439439
.with_version("v0.1.0")
440-
.with_schema_url("https://opentelemetry.io/schema/1.0.0")
440+
.with_schema_url("https://opentelemetry.io/schemas/1.0.0")
441441
.with_attributes(vec![KeyValue::new("k", "v")])
442442
.build();
443443

@@ -451,7 +451,7 @@ fn multiple_scopes() {
451451

452452
let scope_bar = InstrumentationScope::builder("meterbar")
453453
.with_version("v0.1.0")
454-
.with_schema_url("https://opentelemetry.io/schema/1.0.0")
454+
.with_schema_url("https://opentelemetry.io/schemas/1.0.0")
455455
.with_attributes(vec![KeyValue::new("k", "v")])
456456
.build();
457457

@@ -785,13 +785,13 @@ fn duplicate_metrics() {
785785

786786
let scope_ma = InstrumentationScope::builder("ma")
787787
.with_version("v0.1.0")
788-
.with_schema_url("https://opentelemetry.io/schema/1.0.0")
788+
.with_schema_url("https://opentelemetry.io/schemas/1.0.0")
789789
.with_attributes(vec![KeyValue::new("k", "v")])
790790
.build();
791791

792792
let scope_mb = InstrumentationScope::builder("mb")
793793
.with_version("v0.1.0")
794-
.with_schema_url("https://opentelemetry.io/schema/1.0.0")
794+
.with_schema_url("https://opentelemetry.io/schemas/1.0.0")
795795
.with_attributes(vec![KeyValue::new("k", "v")])
796796
.build();
797797

opentelemetry-sdk/src/logs/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ mod tests {
127127
.build();
128128

129129
let scope = InstrumentationScope::builder("test_logger")
130-
.with_schema_url("https://opentelemetry.io/schema/1.0.0")
130+
.with_schema_url("https://opentelemetry.io/schemas/1.0.0")
131131
.with_attributes(vec![(KeyValue::new("test_k", "test_v"))])
132132
.build();
133133

@@ -149,7 +149,7 @@ mod tests {
149149
assert_eq!(instrumentation_scope.name(), "test_logger");
150150
assert_eq!(
151151
instrumentation_scope.schema_url(),
152-
Some("https://opentelemetry.io/schema/1.0.0")
152+
Some("https://opentelemetry.io/schemas/1.0.0")
153153
);
154154
assert!(instrumentation_scope
155155
.attributes()

opentelemetry/CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ Before:
267267
let logger = provider.versioned_logger(
268268
"my-logger-name",
269269
Some(env!("CARGO_PKG_VERSION")),
270-
Some("https://opentelemetry.io/schema/1.0.0"),
270+
Some("https://opentelemetry.io/schemas/1.0.0"),
271271
Some(vec![KeyValue::new("key", "value")]),
272272
);
273273
```
@@ -278,7 +278,7 @@ After:
278278
let logger = provider
279279
.logger_builder("my-logger-name")
280280
.with_version(env!("CARGO_PKG_VERSION"))
281-
.with_schema_url("https://opentelemetry.io/schema/1.0.0")
281+
.with_schema_url("https://opentelemetry.io/schemas/1.0.0")
282282
.with_attributes(vec![KeyValue::new("key", "value")])
283283
.build();
284284
```
@@ -291,7 +291,7 @@ Before:
291291
let tracer = provider.versioned_tracer(
292292
"my-tracer-name",
293293
Some(env!("CARGO_PKG_VERSION")),
294-
Some("https://opentelemetry.io/schema/1.0.0"),
294+
Some("https://opentelemetry.io/schemas/1.0.0"),
295295
Some(vec![KeyValue::new("key", "value")]),
296296
);
297297
```
@@ -302,7 +302,7 @@ After:
302302
let tracer = provider
303303
.tracer_builder("my-tracer-name")
304304
.with_version(env!("CARGO_PKG_VERSION"))
305-
.with_schema_url("https://opentelemetry.io/schema/1.0.0")
305+
.with_schema_url("https://opentelemetry.io/schemas/1.0.0")
306306
.with_attributes(vec![KeyValue::new("key", "value")])
307307
.build();
308308
```

opentelemetry/src/global/metrics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub fn meter(name: &'static str) -> Meter {
7171
///
7272
/// let scope = InstrumentationScope::builder("io.opentelemetry")
7373
/// .with_version("0.17")
74-
/// .with_schema_url("https://opentelemetry.io/schema/1.2.0")
74+
/// .with_schema_url("https://opentelemetry.io/schemas/1.2.0")
7575
/// .with_attributes(vec![(KeyValue::new("key", "value"))])
7676
/// .build();
7777
///

opentelemetry/src/global/trace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ pub fn tracer(name: impl Into<Cow<'static, str>>) -> BoxedTracer {
408408
///
409409
/// let scope = InstrumentationScope::builder("io.opentelemetry")
410410
/// .with_version("0.17")
411-
/// .with_schema_url("https://opentelemetry.io/schema/1.2.0")
411+
/// .with_schema_url("https://opentelemetry.io/schemas/1.2.0")
412412
/// .with_attributes(vec![(KeyValue::new("key", "value"))])
413413
/// .build();
414414
///

opentelemetry/src/logs/logger.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub trait LoggerProvider {
4444
/// // logger used in libraries/crates that optionally includes version and schema url
4545
/// let scope = InstrumentationScope::builder(env!("CARGO_PKG_NAME"))
4646
/// .with_version(env!("CARGO_PKG_VERSION"))
47-
/// .with_schema_url("https://opentelemetry.io/schema/1.0.0")
47+
/// .with_schema_url("https://opentelemetry.io/schemas/1.0.0")
4848
/// .build();
4949
///
5050
/// let logger = provider.logger_with_scope(scope);

opentelemetry/src/metrics/meter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub trait MeterProvider {
5454
/// // meter used in libraries/crates that optionally includes version and schema url
5555
/// let scope = InstrumentationScope::builder(env!("CARGO_PKG_NAME"))
5656
/// .with_version(env!("CARGO_PKG_VERSION"))
57-
/// .with_schema_url("https://opentelemetry.io/schema/1.0.0")
57+
/// .with_schema_url("https://opentelemetry.io/schemas/1.0.0")
5858
/// .build();
5959
///
6060
/// let meter = provider.meter_with_scope(scope);

opentelemetry/src/trace/tracer_provider.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub trait TracerProvider {
4949
/// let scope =
5050
/// InstrumentationScope::builder(env!("CARGO_PKG_NAME"))
5151
/// .with_version(env!("CARGO_PKG_VERSION"))
52-
/// .with_schema_url("https://opentelemetry.io/schema/1.0.0")
52+
/// .with_schema_url("https://opentelemetry.io/schemas/1.0.0")
5353
/// .build();
5454
///
5555
/// let tracer = provider.tracer_with_scope(scope);

0 commit comments

Comments
 (0)