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

Non-namespaced attributes for metrics #2513

Open
pmm-sumo opened this issue Apr 26, 2022 · 2 comments
Open

Non-namespaced attributes for metrics #2513

pmm-sumo opened this issue Apr 26, 2022 · 2 comments
Assignees
Labels
spec:metrics Related to the specification/metrics directory

Comments

@pmm-sumo
Copy link
Contributor

What are you trying to achieve?

Attribute naming conventions specify that all names SHOULD be part of a namespace.

However, for many of the collector database receivers this is usually not the case and they list non-namespaced attributes (which are not part of the specification). For example, this is the case for mysqlreceiver, mongodbreceiver, postgresqlreceiver and others

On the other hand, some of the database metrics receivers follow the requirement. E.g. sqlserverreceiver (only two attributes listed though)

This brings a question if new metrics receivers should follow the other receivers implementation (non-namespaced attributes) or semantic conventions recommendations (namespaced attributes). This will further lead to either of two actions:

Option 1: the recommendations might be changed and e.g. allow for non-namespaced names being used for the attributes (perhaps only at the record-level). This might be sound for metrics when the metric name is already namespaced.

Option 2: the metric receivers implementation should follow the specification and add namespaces.

@pmm-sumo
Copy link
Contributor Author

Some notes from the SIG:

  • Metrics had "labels" in the past, which were something different than attribute
  • We need to be cautious of the attribute name, which might impact e.g. Prometheus
  • Having consistent naming (with namespaces) would avoid confusion across the signals though

It would be beneficial to bring some examples of attributes with/without namespaces and see how they look

@jamesmoessis
Copy link
Contributor

Option 2: the metric receivers implementation should follow the specification and add namespaces.

I like this option. Is there any reason that the metric receivers can't follow the datbabase semantic convention? If there doesn't exist a semantic convention for an attributes, and it is a general-enough use case, then IMO it should be added to the semantic convention. This means the same metric will be consistent elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:metrics Related to the specification/metrics directory
Projects
None yet
Development

No branches or pull requests

3 participants