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

Remove confusion between namespace and named meter #7

Conversation

dyladan
Copy link
Member

@dyladan dyladan commented Jan 8, 2020

This PR clarifies some wording which conflated the terms namespace and Meter Name. It also adds back the Meter creation section which was originally introduced by @z1c0 in open-telemetry#264 and removed in open-telemetry#250.

This addresses issue open-telemetry#391

specification/api-metrics-user.md Outdated Show resolved Hide resolved
specification/api-metrics-user.md Outdated Show resolved Hide resolved
specification/api-metrics-user.md Outdated Show resolved Hide resolved
specification/api-metrics-user.md Outdated Show resolved Hide resolved
@arminru arminru force-pushed the named-meter-namespace-clarification-review branch from 7e6367c to f6feff0 Compare January 13, 2020 13:20
In case an invalid name (null or empty string) is specified, a working default `Meter` implementation as a fallback is returned
rather than returning null or throwing an exception.
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).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(e.g. an implementation which is not even observability-related)

What does this mean? @z1c0 do you know?

specification/api-metrics-user.md Outdated Show resolved Hide resolved
Comment on lines 25 to 26
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).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this trying to say? Just that applications cannot rely on different instances being returned for different names? Then this should be stated as such. Right now this sentence sounds too vague for a spec. State the requirements that implementations of this method must fulfill, or, equivalently, the properties of this method that callers can rely on.

@danielkhan danielkhan changed the title Remove confusion between namepace and named meter Remove confusion between namespace and named meter Jan 13, 2020
Copy link

@danielkhan danielkhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

developers to instrument their code using counters, gauges, and
measures.
Metric instruments are the entry point for application and framework developers to instrument their code using counters, gauges, and measures.
Metrics are created by calling methods on a `Meter` which is in turn created by a global `MeterFactory`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't we change to a "Registry" term in the tracing world?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're updating the otep before the spec

@@ -38,7 +36,7 @@ external systems. Metric names conform to the following syntax:
4. Subsequent characters must be belong to the alphanumeric characters, '_', '.', and '-'.

Metric names belong to a namespace. The `component` label value of the associated `Meter` serves as its namespace,
allowing the same metric name to be used in multiple libraries of code, unambiguously, within the same application.
allowing the same metric name to be used in multiple libraries of code, unambiguously, within the same application.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two spaces at the end of a line create a line break without introducing a new paragraph and were added intentionally

@dyladan dyladan merged commit 5b9e36f into named-meter-namespace-clarification Jan 14, 2020
@dyladan dyladan deleted the named-meter-namespace-clarification-review branch January 14, 2020 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants