Skip to content

Commit

Permalink
add doc for transport protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
huandu committed Mar 27, 2024
1 parent e2b44dd commit a580740
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import 'package:opentelemetry/sdk.dart' as otel_sdk;
final exporter = otel_sdk.CollectorExporter(Uri.parse('https://my-collector.com/v1/traces'));
```

The CollectorExporter supports transport protocols including `http/protobuf` and `grpc`. The default protocol is `http/protobuf`.

#### ConsoleExporter

The ConsoleExporter has no requirements, and has no configuration options.
Expand Down Expand Up @@ -190,6 +192,7 @@ const result = doWork();
```

You can also create Span Events with additional Attributes:

```dart
span.addEvent('some log', attributes: {
'log.severity': 'error',
Expand All @@ -203,6 +206,7 @@ span.addEvent('some log', attributes: {
In order to generate protobuf definitions, you must have [protoc](https://github.com/protocolbuffers/protobuf/releases) installed and available in your path.

### Publishing New Versions
See https://github.com/Workiva/Observability/blob/master/doc/publishing_opentelemetry_dart.md

See <https://github.com/Workiva/Observability/blob/master/doc/publishing_opentelemetry_dart.md>

Only Workiva maintainers can publish new versions of opentelemetry-dart.

0 comments on commit a580740

Please sign in to comment.