elastic / elastic/apm

Support array of strings as a value for tags/labels

Open
#82 23 comments 5 reactions 0 assignees View on GitHub
apm-agents poll
Dominant language
Gherkin
Stars
427
Forks
125
PR merge metrics
No merged PRs in 30d

Description

## Description of the issue
Currently tags/labels are stored as key/value pairs in ES, however, we have seen users expecting tags to be stored as an array of strings, this is consistent with [ECS-style tags](https://www.elastic.co/guide/en/ecs/current/ecs-base.html).

I'm proposing to support array of strings for adding tags/labels both on the APM server as well as the agent APIs.

The alternative to this approach is to have both labels for key/values and tags for arrays but since supporting just labels (with support for arrays) is more generic, IMO, we should implement the proposed solution.

An example for JavaScript:
```js
apm.addTags({'teams': ['team1','team2']})
```

## What we are voting on
Is this an acceptable solution for agents/apm server?
cc @elastic/apm-agent-devs , @elastic/apm-server

## Vote

| Team | Yes | No | Indifferent | N/A | Link to issue
| --------|:----:|:---:|:-----------:|:----:|:-------------------:|
| .NET |

  • [ ]
|
  • [ ]
|
  • [ ]
|
  • [ ]
|
| Go |
  • [x]
|
  • [ ]
|
  • [ ]
|
  • [ ]
|
| Java |
  • [ ]
|
  • [ ]
|
  • [ ]
|
  • [ ]
|
| Node.js |
  • [ ]
|
  • [ ]
|
  • [ ]
|
  • [ ]
|
| Python |
  • [ ]
|
  • [ ]
|
  • [ ]
|
  • [ ]
|
| Ruby |
  • [ ]
|
  • [ ]
|
  • [ ]
|
  • [ ]
|
| RUM |
  • [ ]
|
  • [ ]
|
  • [ ]
|
  • [ ]
|
| APM Server |
  • [ ]
|
  • [ ]
|
  • [ ]
|
  • [ ]
|

Contributor guide

No contributing guide indexed for this repository

Research direction

No source files, tests, or entry points are named. Start by reviewing the agent tag/label APIs and the APM server's Elasticsearch mapping and intake handling, then compare them with the ECS-style tags example. Done means the teams agree on the array representation, affected APIs and compatibility behavior, with implementation scope identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, go, java, javascript, node.js, python, ruby
Domain
api, backend, observability-sre, search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.