Skip to content

Commit

Permalink
opentelemetry does not work because tokio-rs/tracing-opentelemetry#154
Browse files Browse the repository at this point in the history
  • Loading branch information
timzaak committed Jul 13, 2024
1 parent 725997c commit b191668
Show file tree
Hide file tree
Showing 10 changed files with 416 additions and 35 deletions.
152 changes: 152 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions config.release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,8 @@ addr = "0.0.0.0"
# [[domains.cache.client_cache]]
# expire = '30d' # 30day
# extension_names = ['icon', 'gif', 'jpg', 'jpeg', 'png', 'js']

[openTelemetry]
endpoint = "http://localhost:4317"


8 changes: 7 additions & 1 deletion docs/develop/develop-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,10 @@ https.acme {

## reqwest

when reqwest use rustls, redirect would have problems: it would not redirect event with Policy::default().
when reqwest use rustls, redirect would have problems: it would not redirect event with Policy::default().

## OpenTelemetry Test

```shell
docker run --rm -p4317:4317 -p16686:16686 jaegertracing/all-in-one:latest
```
3 changes: 2 additions & 1 deletion docs/develop/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
### Version 2.x

- bench: add benchmark
- admin server support HTTPS
- admin server support HTTPS
- openTelemetry
18 changes: 10 additions & 8 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ name = "spa-server"
path = "src/bin/main.rs"

[dependencies]
entity = {path = "../entity"}
entity = { path = "../entity" }
# web
hyper = { version = "0.14", features = ["stream", "server", "http1", "http2", "tcp"] } # sync with warp
tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "io-std", "sync", "time", "tokio-macros"] } # sync with warp
Expand Down Expand Up @@ -47,12 +47,13 @@ flate2 = "1.0"
tracing = "0.1.21"# sync with warp
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

#tracing-opentelemetry = "0.24"
#opentelemetry = "0.23"
#opentelemetry_sdk = { version = "0.23", features = ["rt-tokio", "metrics"] }
#opentelemetry-otlp = {version = "0.16", features = ["default", "metrics"]}
#opentelemetry-resource-detectors = {version = "0.2"}
#opentelemetry-semantic-conventions = { version = "0.15"}
tracing-opentelemetry = "0.24"
opentelemetry = "0.23"
opentelemetry_sdk = { version = "0.23", features = ["rt-tokio", "metrics"] }
opentelemetry-otlp = { version = "0.16", features = ["default", "metrics"] }
opentelemetry-stdout = { version = "0.4", features = ["trace"] }
opentelemetry-resource-detectors = { version = "0.2" }
opentelemetry-semantic-conventions = { version = "0.15" }

# tokio cron
delay_timer = "0.11.6" # dashmap is same
Expand Down Expand Up @@ -89,4 +90,5 @@ walkdir = "2.5"
# time
chrono = { version = "0.4", features = ["serde"] }
#make if let more easy
if_chain = "1"
if_chain = "1"
tracing-core = "0.1.32"
Loading

0 comments on commit b191668

Please sign in to comment.