grafana / pyroscope-java

pyroscope java integration
Apache License 2.0
72 stars 31 forks source link

Add tags through setting environment of variables #60

Closed nthnb closed 1 year ago

nthnb commented 1 year ago

Hi, a feature request that would be really helpful for us would be to be able to add tags to our samples via setting of environment variables for the agent. For instance, if we set: PYROSCOPE_PROFILER_TAG_XXX=yyy

This could be converted to: Pyroscope.setStaticLabels(Map.of("xxx", System.getenv("PYROSCOPE_PROFILER_TAG_XXX")));

This would be variable helpful if we wanted to filter by say, deployment version of our apps. Please let me know you need any more information! Thanks

Rperry2174 commented 1 year ago

Hi @nthnb we just added this recently in #57.

You can find docs for it here

Let us know if we can improve the docs or feature in any way (or if you are requesting something different)!

nthnb commented 1 year ago

Perfect! I missed that when looking through the docs, that's my bad. Thanks for the help! I'll close this issue now

Rperry2174 commented 1 year ago

no worries @nthnb please let us know if you have any other feedback / requests!