Skip to content

Commit 1f31465

Browse files
authored
Merge branch 'main' into background_thread_batch_log
2 parents aef732d + 0605341 commit 1f31465

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1623
-608
lines changed

.cspell.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949
"nocapture",
5050
"Ochtman",
5151
"opentelemetry",
52+
"OTELCOL",
5253
"OTLP",
54+
"periodicreader",
5355
"protoc",
5456
"quantile",
5557
"Redelmeier",
@@ -59,6 +61,7 @@
5961
"shoppingcart",
6062
"struct",
6163
"Tescher",
64+
"testresults",
6265
"tracerprovider",
6366
"updown",
6467
"Zhongyang",

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148
if: hashFiles('Cargo.lock') == ''
149149
run: cargo generate-lockfile
150150
- name: cargo llvm-cov
151-
run: cargo llvm-cov --locked --all-features --workspace --lcov --output-path lcov.info
151+
run: cargo llvm-cov --locked --all-features --workspace --lcov --lib --output-path lcov.info
152152
- name: Upload to codecov.io
153153
uses: codecov/codecov-action@v4
154154
env:

examples/logs-basic/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ license = "Apache-2.0"
66
publish = false
77

88
[dependencies]
9-
opentelemetry = { path = "../../opentelemetry", features = ["logs"] }
109
opentelemetry_sdk = { path = "../../opentelemetry-sdk", features = ["logs"] }
1110
opentelemetry-stdout = { path = "../../opentelemetry-stdout", features = ["logs"]}
1211
opentelemetry-appender-tracing = { path = "../../opentelemetry-appender-tracing", default-features = false}
13-
opentelemetry-semantic-conventions = { path = "../../opentelemetry-semantic-conventions" }
1412
tracing = { workspace = true, features = ["std"]}
1513
tracing-subscriber = { workspace = true, features = ["registry", "std"] }

examples/metrics-advanced/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ opentelemetry = { path = "../../opentelemetry", features = ["metrics"] }
1010
opentelemetry_sdk = { path = "../../opentelemetry-sdk", features = ["spec_unstable_metrics_views", "rt-tokio"] }
1111
opentelemetry-stdout = { path = "../../opentelemetry-stdout", features = ["metrics"] }
1212
tokio = { workspace = true, features = ["full"] }
13-
serde_json = { workspace = true }

examples/metrics-basic/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ opentelemetry = { path = "../../opentelemetry", features = ["metrics"] }
1010
opentelemetry_sdk = { path = "../../opentelemetry-sdk", features = ["metrics", "rt-tokio"] }
1111
opentelemetry-stdout = { path = "../../opentelemetry-stdout", features = ["metrics"]}
1212
tokio = { workspace = true, features = ["full"] }
13-
serde_json = { workspace = true }
1413

examples/tracing-grpc/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ opentelemetry-stdout = { path = "../../opentelemetry-stdout", features = ["trace
2020
prost = { workspace = true }
2121
tokio = { workspace = true, features = ["full"] }
2222
tonic = { workspace = true }
23-
serde_json = { workspace = true }
2423

2524
[build-dependencies]
2625
tonic-build = { workspace = true }

examples/tracing-jaeger/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ publish = false
99
opentelemetry = { path = "../../opentelemetry" }
1010
opentelemetry_sdk = { path = "../../opentelemetry-sdk", features = ["rt-tokio"] }
1111
opentelemetry-otlp = { path = "../../opentelemetry-otlp", features = ["tonic"] }
12-
opentelemetry-semantic-conventions = { path = "../../opentelemetry-semantic-conventions" }
1312
tokio = { workspace = true, features = ["full"] }

opentelemetry-otlp/examples/basic-otlp-http/Cargo.toml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,9 @@ experimental_metrics_periodicreader_with_async_runtime = ["opentelemetry_sdk/exp
1616
once_cell = { workspace = true }
1717
opentelemetry = { path = "../../../opentelemetry" }
1818
opentelemetry_sdk = { path = "../../../opentelemetry-sdk", features = ["rt-tokio", "experimental_metrics_periodicreader_with_async_runtime"]}
19-
opentelemetry-http = { path = "../../../opentelemetry-http", optional = true, default-features = false}
2019
opentelemetry-otlp = { path = "../..", features = ["http-proto", "http-json", "logs"] , default-features = false}
2120
opentelemetry-appender-tracing = { path = "../../../opentelemetry-appender-tracing", default-features = false}
22-
opentelemetry-semantic-conventions = { path = "../../../opentelemetry-semantic-conventions" }
2321

24-
async-trait = { workspace = true, optional = true }
25-
bytes = { workspace = true, optional = true }
26-
http = { workspace = true, optional = true }
27-
http-body-util = { workspace = true, optional = true }
2822
tokio = { workspace = true, features = ["full"] }
2923
tracing = { workspace = true, features = ["std"]}
30-
tracing-core = { workspace = true }
3124
tracing-subscriber = { workspace = true, features = ["env-filter","registry", "std", "fmt"] }

opentelemetry-otlp/examples/basic-otlp-http/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ recommended approach when using OTLP exporters. While it can be modified to use
1616
a `SimpleExporter`, this requires enabling feature flag `reqwest-blocking-client` and
1717
making the `main()` a normal main and *not* `tokio::main`
1818

19-
// TODO: Metrics does not work with non tokio main when using `reqwest-blocking-client` today, fix that when switching
19+
// TODO: Metrics does not work with non tokio main when using `reqwest-blocking-client` today, fix that when switching
2020
// default to use own thread.
2121
// TODO: Document `hyper` feature flag when using SimpleProcessor.
2222

@@ -66,14 +66,12 @@ Run the app which exports logs, metrics and traces via OTLP to the collector
6666
cargo run
6767
```
6868

69-
7069
By default the app will use a `reqwest` client to send. A hyper 0.14 client can be used with the `hyper` feature enabled
7170

7271
```shell
7372
cargo run --no-default-features --features=hyper
7473
```
7574

76-
7775
## View results
7876

7977
You should be able to see something similar below with different time and ID in the same console that docker runs.
@@ -135,7 +133,7 @@ SpanEvent #0
135133
-> Timestamp: 2024-05-14 02:15:56.824201397 +0000 UTC
136134
-> DroppedAttributesCount: 0
137135
-> Attributes::
138-
-> bogons: Int(100)
136+
-> some.key: Int(100)
139137
{"kind": "exporter", "data_type": "traces", "name": "logging"}
140138
...
141139
```

opentelemetry-otlp/examples/basic-otlp-http/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
106106

107107
// Create a new tracing::Fmt layer to print the logs to stdout. It has a
108108
// default filter of `info` level and above, and `debug` and above for logs
109-
// from OpenTelemtry crates. The filter levels can be customized as needed.
109+
// from OpenTelemetry crates. The filter levels can be customized as needed.
110110
let filter_fmt = EnvFilter::new("info").add_directive("opentelemetry=debug".parse().unwrap());
111111
let fmt_layer = tracing_subscriber::fmt::layer()
112112
.with_thread_names(true)
@@ -148,7 +148,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
148148
let span = cx.span();
149149
span.add_event(
150150
"Nice operation!".to_string(),
151-
vec![KeyValue::new("bogons", 100)],
151+
vec![KeyValue::new("some.key", 100)],
152152
);
153153
span.set_attribute(KeyValue::new("another.key", "yes"));
154154

0 commit comments

Comments
 (0)