Skip to content

Commit

Permalink
Add logs and metrics to default features in api, sdk and otlp crate (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cijothomas committed May 19, 2024
1 parent 29ac005 commit 79189a8
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 11 deletions.
17 changes: 9 additions & 8 deletions examples/logs-basic/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Log Appender for API - Example
# OpenTelemetry Log Appender for log - Example

This example shows how to use the opentelemetry-appender-log crate, which is a
[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.
The example setups a LoggerProvider with stdout exporter, so logs are emitted to stdout.
[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. The example setups a LoggerProvider with stdout exporter, so logs
are emitted to stdout.

## Usage

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

```shell
$ cargo run
cargo run
```



3 changes: 3 additions & 0 deletions opentelemetry-otlp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## vNext

- Add "metrics", "logs" to default features. With this, default feature list is
"trace", "metrics" and "logs".

## v0.16.0

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-otlp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ logs = ["opentelemetry/logs", "opentelemetry_sdk/logs", "opentelemetry-proto/log
# add ons
serialize = ["serde", "serde_json"]

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

# grpc using tonic
grpc-tonic = ["tonic", "prost", "http", "tokio", "opentelemetry-proto/gen-tonic"]
Expand Down
3 changes: 3 additions & 0 deletions opentelemetry-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## vNext

- Add "metrics", "logs" to default features. With this, default feature list is
"trace", "metrics" and "logs".

## v0.23.0

- Fix SimpleSpanProcessor to be consistent with log counterpart. Also removed
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ temp-env = { workspace = true }
pprof = { version = "0.13", features = ["flamegraph", "criterion"] }

[features]
default = ["trace"]
default = ["trace", "metrics", "logs"]
trace = ["opentelemetry/trace", "rand", "async-trait", "percent-encoding"]
jaeger_remote_sampler = ["trace", "opentelemetry-http", "http", "serde", "serde_json", "url"]
logs = ["opentelemetry/logs", "async-trait", "serde_json"]
Expand Down
3 changes: 3 additions & 0 deletions opentelemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## vNext

- Add "metrics", "logs" to default features. With this, default feature list is
"trace", "metrics" and "logs".

## v0.23.0

### Added
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ thiserror = { workspace = true }
js-sys = "0.3.63"

[features]
default = ["trace"]
default = ["trace", "metrics", "logs"]
trace = ["pin-project-lite"]
metrics = []
testing = ["trace", "metrics"]
Expand Down

0 comments on commit 79189a8

Please sign in to comment.