Add ability to set multiple tags at the same time
See original GitHub issueToday we have a setTag(key, value)
function which allows you to set a tag on the current transaction.
As discussed on the APM forum, it would be nice to be able to set more than one tag at a time.
Since the existing setTag
is singular, I’m thinking it’s better to create a new function. We can keep supporting both functions or we can deprecate the old one. I’m not sure what’s best.
Proposed new API:
agent.setTags({key1: 'value', key2: 'value'})
Questions:
- Should we deprecate
setTag
or keep supporting it? - Should it be possible to clear the already set tags, or will calling
setTags
multiple times just add to the list of tags?
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (13 by maintainers)
Top Results From Across the Web
How to add a class to multiple tags in a form at the same time
Use , to seperate selectors. $("[name='" + value + "'],#checkbox-group1,form").addClass("h-red");.
Read more >Add ability to add multiple tags with docker build #863 - GitHub
I have some automated builds using docker build and a Dockerfile . With docker build -t <tag> I can set a tag for...
Read more >Setting multiple tags to the same value in one command
I have a number of tags I'd like to set to the same value (taken from another tag). I know I can write...
Read more >Ability to type multiple tags separated by commas - Tropy
In most tagging software I've used you can add multiple tags at once by typing them all in the entry field, separated by...
Read more >Organize your reminders with tags on iPhone - Apple Support
You can add one or more tags to a reminder, such as #shopping and #work, and easily search and filter your reminders across...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The object +
set
implies full overwrite instead of merge to me@Qard I think with for instance
addTags()
we’ll not want to do anything if there isn’t currently an active transaction. It could be that instrumentation have been disabled, or we’re sampling and this current request hasn’t been chosen as a sample, or simply that there’s a bug where we have lost context due to an un-patched async operation. We have have the same issue withagent.buildSpan()
btw, this will returnnull
instead of a span if there isn’t an active transaction so all subsequent calls tospan.*
needs to have a guard before it. So it would be cool if we could find a solution to this that made the API simpler to work with 😃