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

Define the fallback tracer name for invalid values. #1534

Merged
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ release.

- Add `ForceFlush` to `Span Exporter` interface ([#1467](https://github.com/open-telemetry/opentelemetry-specification/pull/1467))
- Clarify the description for the `TraceIdRatioBased` sampler needs to include the sampler's sampling ratio. ([#1536](https://github.com/open-telemetry/opentelemetry-specification/pull/1536))
- Define the fallback tracer name for invalid values.
([#1534](https://github.com/open-telemetry/opentelemetry-specification/pull/1534))

### Metrics

Expand Down
5 changes: 3 additions & 2 deletions specification/trace/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ This API MUST accept the following parameters:
In that scenario, the `name` denotes a module name or component name within that library
or application.
In case an invalid name (null or empty string) is specified, a working
default Tracer implementation as a fallback is returned rather than returning
null or throwing an exception.
Tracer implementation MUST be returned as a fallback rather than returning
null or throwing an exception, its `name` property SHOULD keep the original invalid value,
and a message reporting that the specified value is invalid SHOULD be logged.
A library, implementing the OpenTelemetry API *may* also ignore this name and
return a default instance for all calls, if it does not support "named"
functionality (e.g. an implementation which is not even observability-related).
Expand Down