Skip to content

Commit 72c14be

Browse files
committed
Add logs and metrics to default features in api, sdk and otlp crate
1 parent 2210d7b commit 72c14be

File tree

7 files changed

+21
-11
lines changed

7 files changed

+21
-11
lines changed

examples/logs-basic/README.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
# Log Appender for API - Example
1+
# OpenTelemetry Log Appender for log - Example
22

33
This example shows how to use the opentelemetry-appender-log crate, which is a
4-
[logging appender](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/glossary.md#log-appender--bridge) that bridges logs from the [log crate](https://docs.rs/log/latest/log/) to OpenTelemetry.
5-
The example setups a LoggerProvider with stdout exporter, so logs are emitted to stdout.
4+
[logging
5+
appender](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/glossary.md#log-appender--bridge)
6+
that bridges logs from the [log crate](https://docs.rs/log/latest/log/) to
7+
OpenTelemetry. The example setups a LoggerProvider with stdout exporter, so logs
8+
are emitted to stdout.
69

710
## Usage
811

9-
Run the following, and Logs emitted using [log](https://docs.rs/log/latest/log/) will be written out to stdout.
12+
Run the following, and Logs emitted using [log](https://docs.rs/log/latest/log/)
13+
will be written out to stdout.
1014

1115
```shell
12-
$ cargo run
16+
cargo run
1317
```
14-
15-
16-

opentelemetry-otlp/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## vNext
44

5+
- Add "metrics", "logs" to default features. With this, default feature list is
6+
"trace", "metrics" and "logs".
7+
58
## v0.16.0
69

710
### Fixed

opentelemetry-otlp/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ logs = ["opentelemetry/logs", "opentelemetry_sdk/logs", "opentelemetry-proto/log
6060
# add ons
6161
serialize = ["serde", "serde_json"]
6262

63-
default = ["grpc-tonic", "trace"]
63+
default = ["grpc-tonic", "trace", "metrics", "logs"]
6464

6565
# grpc using tonic
6666
grpc-tonic = ["tonic", "prost", "http", "tokio", "opentelemetry-proto/gen-tonic"]

opentelemetry-sdk/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## vNext
44

5+
- Add "metrics", "logs" to default features. With this, default feature list is
6+
"trace", "metrics" and "logs".
7+
58
## v0.23.0
69

710
- Fix SimpleSpanProcessor to be consistent with log counterpart. Also removed

opentelemetry-sdk/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ temp-env = { workspace = true }
4444
pprof = { version = "0.13", features = ["flamegraph", "criterion"] }
4545

4646
[features]
47-
default = ["trace"]
47+
default = ["trace", "metrics", "logs"]
4848
trace = ["opentelemetry/trace", "rand", "async-trait", "percent-encoding"]
4949
jaeger_remote_sampler = ["trace", "opentelemetry-http", "http", "serde", "serde_json", "url"]
5050
logs = ["opentelemetry/logs", "async-trait", "serde_json"]

opentelemetry/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## vNext
44

5+
- Add "metrics", "logs" to default features. With this, default feature list is
6+
"trace", "metrics" and "logs".
7+
58
## v0.23.0
69

710
### Added

opentelemetry/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ thiserror = { workspace = true }
3131
js-sys = "0.3.63"
3232

3333
[features]
34-
default = ["trace"]
34+
default = ["trace", "metrics", "logs"]
3535
trace = ["pin-project-lite"]
3636
metrics = []
3737
testing = ["trace", "metrics"]

0 commit comments

Comments
 (0)