-
Notifications
You must be signed in to change notification settings - Fork 183
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
Add k8s.namespace.phase metric and attribute #1668
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: ChrsMark <[email protected]>
9b13449
to
7e057ce
Compare
Signed-off-by: ChrsMark <[email protected]>
stability: experimental | ||
brief: "Operational status: `1` (true) or `0` (false) for each of the possible phases" | ||
instrument: updowncounter | ||
unit: "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be empty unit?
"1" is for utilization:
Instruments for utilization metrics (that measure the fraction out of a total) are dimensionless and SHOULD use the default unit 1 (the unity).
Ref: https://opentelemetry.io/docs/specs/semconv/general/metrics/#instrument-units
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed what
semantic-conventions/model/hardware/common-metrics.yaml
Lines 49 to 65 in a596f19
- id: metric.hw.status | |
type: metric | |
metric_name: hw.status | |
stability: experimental | |
brief: "Operational status: `1` (true) or `0` (false) for each of the possible states" | |
instrument: updowncounter | |
unit: "1" | |
extends: metric.hw.attributes | |
note: > | |
`hw.status` is currently specified as an *UpDownCounter* but would ideally be represented using a | |
[*StateSet* as defined in OpenMetrics](https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#stateset). | |
This semantic convention will be updated once *StateSet* is specified in OpenTelemetry. This planned change | |
is not expected to have any consequence on the way users query their timeseries backend to retrieve the | |
values of `hw.status` over time. | |
attributes: | |
- ref: hw.state | |
requirement_level: required |
@open-telemetry/specs-semconv-maintainers any suggestion here?
Part of #1032
Changes
This PR adds the
k8s.namespace.phase
as metric along with its respective attributek8s.namespace.phase
.This metric is already in use by the Collector and specifically the
k8scluster
receiver.The introduced attribute is new in order to follow the modeling that is already in use by
hw
metrics andjmx
metrics mentioned at #1032 (comment) (see #1554).Collector implementation: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/9dfa2f7813b11500d001622f3d8c1dd8d9ac58fd/receiver/k8sclusterreceiver/internal/namespace/namespaces.go#L14
K8s API ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#namespacestatus-v1-core
Merge requirement checklist
[chore]