You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "pgier (via GitHub)" <gi...@apache.org> on 2023/02/17 16:34:24 UTC

[GitHub] [pulsar] pgier opened a new issue, #19554: Add pulsar_tenant and pulsar_namespace labels to prometheus metrics

pgier opened a new issue, #19554:
URL: https://github.com/apache/pulsar/issues/19554

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
   
   
   ### Motivation
   
   It can be useful in to combine metrics by the pulsar tenant or namespace.  Currently this is difficult to do by tenant because there is no distinct tenant label.  There is only the `namespace` label which has the format `<pulsar-tenant>/<pulsar-namespace>`.
   
   ### Solution
   
   Add new two new labels to prometheus metrics: `pulsar_tenant` and `pulsar_namespace`.  This would allow metrics to easily be grouped by tenant, and the `pulsar_namespace` label would avoid confusion with the kubernetes namespace.  We should also keep the current `namespace` label, but consider deprecating it and eventually remove it in some future release.
   
   ### Alternatives
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] asafm commented on issue #19554: Add pulsar_tenant and pulsar_namespace labels to prometheus metrics

Posted by "asafm (via GitHub)" <gi...@apache.org>.
asafm commented on issue #19554:
URL: https://github.com/apache/pulsar/issues/19554#issuecomment-1589666563

   I also considered adding a Tenant attribute in OpenTelemetry metrics (once voted approved and started working on it) and changing the namespace to be only the Namespace name.
   I'm ok with `pulsar_namespace` to avoid confusion with k8s. In OTel, all attributes have their domain prefix. I still need to figure it out - researching as there are Messaging Semantics standards that are being revised as we speak.
   
   
   Of course, we need to retain the namespace attribute to avoid breaking anyone. 
   Also, we need to change the existing Grafana dashboards accordingly.
   
   Please note that there is yet to be a single place in Pulsar where you can ask: given a topic, give me its Attributes (labels). I planned to write one for OTel. Once you have that, you also need to make sure it's used everywhere. 
   In OTel, I plan that this will be part of the metrics infrastructure so that Plugins will also use this. Otherwise, you would also get inconsistency in plugins reporting this.
   
   @codelipenghui @hangc0276, any opinion
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on issue #19554: Add pulsar_tenant and pulsar_namespace labels to prometheus metrics

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19554:
URL: https://github.com/apache/pulsar/issues/19554#issuecomment-1635164136

   The issue had no activity for 30 days, mark with Stale label.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add pulsar_tenant and pulsar_namespace labels to prometheus metrics [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat closed issue #19554: Add pulsar_tenant and pulsar_namespace labels to prometheus metrics
URL: https://github.com/apache/pulsar/issues/19554


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add pulsar_tenant and pulsar_namespace labels to prometheus metrics [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat commented on issue #19554:
URL: https://github.com/apache/pulsar/issues/19554#issuecomment-6388830726

   Thanks @pgier. The OpenTelemetry metrics added under PIP-264 (#22467, Pulsar 3.3.0) carry separate `pulsar.tenant` and `pulsar.namespace` attributes. Exported through Prometheus, they appear as `pulsar_tenant` and `pulsar_namespace` labels, so you can group by tenant without parsing, and nothing collides with the Kubernetes `namespace` label. The legacy metrics keep their `namespace` label unchanged for compatibility. Closing as completed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] tisonkun commented on issue #19554: Add pulsar_tenant and pulsar_namespace labels to prometheus metrics

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on issue #19554:
URL: https://github.com/apache/pulsar/issues/19554#issuecomment-1588459992

   cc @michaeljmarshall @asafm is this suggestion valid?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on issue #19554: Add pulsar_tenant and pulsar_namespace labels to prometheus metrics

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19554:
URL: https://github.com/apache/pulsar/issues/19554#issuecomment-1491180290

   The issue had no activity for 30 days, mark with Stale label.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org