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

Semantic conventions for up metric on Resources. #1078 #1102

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ release.

New:

- Semantic conventions for `up` metric on Resources.
([#1102](https://github.com/open-telemetry/opentelemetry-specification/pull/1102))
- Add performance benchmark specification
([#748](https://github.com/open-telemetry/opentelemetry-specification/pull/748))
- Enforce that the Baggage API must be fully functional, even without an installed SDK.
Expand Down
18 changes: 18 additions & 0 deletions specification/metrics/semantic_conventions/resource-metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Semantic conventions for Resource metrics

This document describes metrics created about [Resources](../../resource/sdk.md), the entities
producing telemetry in a system.

## Labels

The current Resource metrics do not have any explicit labels. They SHOULD inherit the [attributes
of the encapsulating](../../resource/semantic_conventions/README.md) Resource when being exported.

## Metric Instruments

The following metric instruments SHOULD be synthesized every time a Resource produces some
Copy link
Contributor

Choose a reason for hiding this comment

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

I am wondering if this SHOULD should be restricted to OTLP exporters? I think we explicitly do not want to export this for a Prometheus exporter, since the receiving end will synthesize up.

We could elaborate on the purpose. Suppose a process starts a metrics SDK but the application registers no instrumentation packages and no instruments. A push OTLP exporter is installed, and now wants to push a single collection interval, consisting of 0 metrics. This metric exists to show the resource is up.

Copy link
Author

Choose a reason for hiding this comment

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

Ok that is a good use case for an up metric with OTLP exporters that I hadn't thought of.

Regarding whether this SHOULD should be restricted to OTLP exporters, what about the prometheus remote write exporter? That is non OTLP but I think we want the up metric.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. @cwildman yes! Maybe we need a term to say when this rule applies, like "original" to indicate when instrumentation is generated, particularly when it is first aggregated into an exposition format. I used the term "aggregated" thinking of the Collector: it will not apply the up metric in any of its exporters but it could apply the metric in some of its receivers. OTel SDKs that export Prometheus remote write would apply this format, agreed.

telemetry.

| Name | Instrument | Units | Description |
|----------------------|---------------|--------------|-------------|
| `resource.up` | UpDownSumObserver | 1 | A value of `1` indicates the Resource is healthy, `0` if the Resource is unhealthy. |