jfrog / log-analytics-datadog

JFrog Datadog Log Analytics Integration
Apache License 2.0
6 stars 4 forks source link

Adding Tags to the metrics #42

Open jlammsm opened 9 months ago

jlammsm commented 9 months ago

How do I add tags to the metric level in the fluentd config, I'm using the datadog integrations/dashboards and I want to be able to filter based on artifactory version.

<match jfrog.metrics.**>
  @type jfrog_send_metrics
  target_platform "DATADOG"
  apikey "#{ENV['DATADOG_API_KEY']}"
  url "https://api.datadoghq.eu/api/v2/series"
  include_tag_key true
  dd_source jfrog_platform
  dd_tags version:7.71.4,env:test
</match>

This doesn't seem to work, i'm assuming because @type jfrog_send_metrics doesn't recognise those values ?

Can i have some advice on this thanks

gregoryboue commented 9 months ago

Hi,

I have exactly the same need, i wrote a support ticket to JFrog...

jlammsm commented 9 months ago

Thanks for the info , did they get back to you ? Ill write one too see what they will say.

gregoryboue commented 9 months ago

I just wrote the ticket this morning, in our case we have to add some tags to the metrics for internal billing. Without the mandatory tags, the metrics are not available through datadog.

jlammsm commented 9 months ago

Okay, ive just created one now aswell hopefully we'll get a response. We have a test cluster and prod cluster but theres no way to differentiate between the two. If they provide a solution or response ill post it in here.

gregoryboue commented 9 months ago

Hi @jlammsm, I had this answer from JFROG support : I would like to inform you that a feature request has already been submitted "Add tags to metrics from Datadog" [for reference PTRENG-5547], and it is currently on our roadmap for implementation. However, I cannot provide a concrete ETA for this at the moment

jlammsm commented 9 months ago

@gregoryboue thanks for the update, I'm still trying to get them to understand what the problem is. Hopefully if there is more than one requesting this it can get expedited.

gregoryboue commented 9 months ago

@jlammsm , I had a meeting with JFrog today, the feature is asked by several customers and is planned for Q1 2023 (end of february).

robinbihun commented 6 months ago

We have a similar use case with self-hosted artifactory. We were finally able to piece together the documentation to get fluentd working and noticed that the DataDog dashboards do not aggregate metrics from a HA setup with multiple instances. We could easily update the dashboards to use tagging on the metrics (which datadog supports); however, it seems the source code for jfrog_metrics and jfrog_send_metrics is no longer available on GitHub.

As it is nearing the end of February 2024, has anyone been able to add custom tag dimensions to their DataDog metrics from the fluentd plugins that JFrog provides?

gangefors commented 1 month ago

Since Feb 27 there is support for DD tags in the metrics submission. https://github.com/jfrog/log-analytics-datadog/commit/ffbf2415b843d11f00a4f3877e69c08f13ee48bd

Unfortunately you can't use #{ENV['FOO_BAR']} in the string since they will be interpreted as literal strings instead of a ruby expression like in all other places. This is likely an issue in the plugin.