Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shippingservice: add http client request span #610

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,5 @@ significant modifications will be credited to OpenTelemetry Authors.
([#587](https://github.com/open-telemetry/opentelemetry-demo/pull/587))
* Pass product's `categories` as an input for the Ad service
([#600](https://github.com/open-telemetry/opentelemetry-demo/pull/600))
* Add HTTP client instrumentation to shippingservice
([#610](https://github.com/open-telemetry/opentelemetry-demo/pull/610))
15 changes: 15 additions & 0 deletions docs/services/shippingservice.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,21 @@ Adding a span event:
info!("Tracking ID Created: {}", tid);
```

### Reqwest HTTP client instrumentation
julianocosta89 marked this conversation as resolved.
Show resolved Hide resolved

A child *client* span is also produced for the outoing HTTP call to
`quoteservice` via the `reqwest` client. This span pairs up with the
corresponding `quoteservice` *server* span. The tracing instrumentation is
implemented in the client middleware making use of the available
`reqwest-middleware`, `reqwest-tracing` and `tracing-opentelementry` libraries:

```rust
let reqwest_client = reqwest::Client::new();
let client = ClientBuilder::new(reqwest_client)
.with(TracingMiddleware::<SpanBackendWithUrl>::new())
.build();
```

## Metrics

TBD
Expand Down
Loading