Skip to content
Discussion options

You must be logged in to vote

I realized that both metric and log are just an object for Vector. I added one more transformation as a workaround.

    [transforms.special_count_metrics]
      ...
      [[transforms.special_count_metrics.metrics]]
       ...
        [transforms.special_count_metrics.metrics.tags]
          ...
          labels_hack = "{{ labels }}"

    [transforms.special_count_metrics_labeled]
      type = "remap"
      inputs = ["special_count_metrics"]
      source = '''
        dynamic_labels = .tags.labels_hack
        del(.tags.labels_hack)
        .tags = merge!(.tags, parse_json!(dynamic_labels))
      '''

It still would have been nice if there was a way with no extra steps, but I think, this w…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bruceg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant