You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,7 @@ For a deeper discussion, see:
126
126
127
127
Currently, the Opentelemetry Rust SDK has two ways to handle errors. In the situation where errors are not allowed to return. One should call global error handler to process the errors. Otherwise, one should return the errors.
128
128
129
-
The Opentelemetry Rust SDK comes with an error type `openetelemetry::Error`. For different function, one error has been defined. All error returned by trace module MUST be wrapped in `opentelemetry::trace::TraceError`. All errors returned by metrics module MUST be wrapped in `opentelemetry::metrics::MetricsError`.
129
+
The Opentelemetry Rust SDK comes with an error type `opentelemetry::Error`. For different function, one error has been defined. All error returned by trace module MUST be wrapped in `opentelemetry::trace::TraceError`. All errors returned by metrics module MUST be wrapped in `opentelemetry::metrics::MetricsError`. All errors returned by logs module MUST be wrapped in `opentelemetry::logs::LogsError`.
130
130
131
131
For users that want to implement their own exporters. It's RECOMMENDED to wrap all errors from the exporter into a crate-level error type, and implement `ExporterError` trait.
132
132
@@ -194,6 +194,7 @@ For GitHub groups see the [code owners](CODEOWNERS) file.
Example showing [Tonic] client and server interaction with OpenTelemetry context propagation. [tracing_opentelemetry](https://docs.rs/tracing-opentelemetry/0.4.0/tracing_opentelemetry/) is used to hook into the [tracing](https://github.com/tokio-rs/tracing) ecosystem, which enables drop-in replacements for [log](https://github.com/rust-lang/log) macros and an `#[instrument]` macro that will automatically add spans to your functions.
3
+
Example showing [Tonic] client and server interaction with OpenTelemetry context
4
+
propagation. Traces are exported to stdout.
4
5
5
6
[Tonic]: https://github.com/hyperium/tonic
6
7
7
-
Examples
8
-
--------
8
+
## Running the example
9
9
10
10
```shell
11
-
# Run jaeger in background
12
-
$ docker run -d -p6831:6831/udp -p6832:6832/udp -p16686:16686 jaegertracing/all-in-one:latest
13
-
14
-
# Run the server
11
+
# Run the server first
15
12
$ cargo run --bin grpc-server
16
13
17
14
# Now run the client to make a request to the server
18
15
$ cargo run --bin grpc-client
19
-
20
-
# View spans (see the image below)
21
-
$ firefox http://localhost:16686/
22
16
```
23
17
24
-

18
+
Observe that the traces are exported to stdout, and that they share the same
19
+
TraceId. Also, the server span would be parented to the client span. The example
20
+
demonstrates how to propagate and restore OpenTelemetry context when making
21
+
out-of-process calls, so as to ensure the same trace is continued in the next
22
+
process. The client here initiates the trace by creating the root client span,
23
+
and it propagates its context to the server. The server, extracts the context,
24
+
and creates its own server span using the extracted context, ensuring both spans
- As part of the gradual deprecation of the exporter functionality of the opentelemetry-jaeger crate, move the opentelemetry-jaeger propagator functionality to a new crate named opentelemetry-jaeger-propagator [#1487](https://github.com/open-telemetry/opentelemetry-rust/pull/1487)
0 commit comments