Skip to content

Commit 4b630d8

Browse files
david-lunatrentmcijothomasxrmx
authored
feat(exporters): add user-agent enrichment (#4560)
Fixes #4479 ## Changes Document that exporters may allow a `user-agent` option to append a product identifier to the exporter User Agent header. such option is only available via local var (not environment) For non-trivial changes, follow the [change proposal process](https://github.com/open-telemetry/opentelemetry-specification/blob/main/CONTRIBUTING.md#proposing-a-change). * [ ] Related issues # * [ ] Related [OTEP(s)](https://github.com/open-telemetry/oteps) # * [ ] Links to the prototypes (when adding or changing features) * [ ] [`CHANGELOG.md`](https://github.com/open-telemetry/opentelemetry-specification/blob/main/CHANGELOG.md) file updated for non-trivial changes * [ ] [`spec-compliance-matrix.md`](https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md) updated if necessary --------- Co-authored-by: Trent Mick <[email protected]> Co-authored-by: Cijo Thomas <[email protected]> Co-authored-by: Riccardo Magliocchetti <[email protected]>
1 parent 6e57784 commit 4b630d8

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ release.
3131

3232
### Common
3333

34+
- OTLP Exporters may allow devs to prepend a product identifier in `User-Agent` header.
35+
([#4560](https://github.com/open-telemetry/opentelemetry-specification/pull/4560))
3436
- ⚠️ **IMPORTANT**: Extending the set of standard attribute value types is no longer a breaking change.
3537
([#4614](https://github.com/open-telemetry/opentelemetry-specification/pull/4614))
3638

specification/protocol/exporter.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,12 @@ OTel-OTLP-Exporter-Python/1.2.3
210210

211211
The format of the header SHOULD follow [RFC 7231][rfc-7231]. The conventions used for specifying the OpenTelemetry SDK language and version are available in the [Resource semantic conventions][resource-semconv].
212212

213+
Exporters MAY expose a configuration option to add a product identifier to the User-Agent header. The resulting User-Agent SHOULD include the exporter's default User-Agent string. The intention is to support an identifier for an OpenTelemetry SDK/Agent [distribution][opentelemetry-distribution]. Typically an exporter would *prepend* the given identifier to its own. For example:
214+
215+
```
216+
MyDistribution/x.y.z OTel-OTLP-Exporter-Python/1.2.3
217+
```
218+
213219
[Boolean]: ../configuration/sdk-environment-variables.md#boolean
214220
[Timeout]: ../configuration/sdk-environment-variables.md#timeout
215221
[String]: ../configuration/sdk-environment-variables.md#string
@@ -223,3 +229,4 @@ The format of the header SHOULD follow [RFC 7231][rfc-7231]. The conventions use
223229
[otlp-http]: https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#otlphttp
224230
[retryable-grpc-status-codes]: https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#failures
225231
[retryable-http-status-codes]: https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#failures-1
232+
[opentelemetry-distribution]: https://opentelemetry.io/docs/concepts/distributions/

0 commit comments

Comments
 (0)