Deployment Integrations
On-premise Integrations
Platform Integrations

Tagging

With Thundra's Java agent, you can add custom tags to your invocations or your applications which will let you eventually better filter the data. Invocation tags are added only to Invocation data type, application tags are global and they are automatically added to Invocation, Metric, Trace, Span, and Log data.

Adding Invocation Tags

You can add custom tags to your invocation with the help static methods of io.thundra.agent.lambda.core.invocation.InvocationSupport object. These are the methods you can in InvocationSupport class.

Searchable Invocation Tags

For now, only primitive String, Number and Boolean typed tag values can be searched. Other complex typed (List, Set, Map, Object, ...) tags values cannot be searched but can be seen in the invocation details

Here are the InvocationSupport's programmatic tag API:

Tag Support API
public static <T> T getTag(String name);
public static Map<String, Object> getTags();
public static void setTag(String name, Object value);
public static void setTags(Map<String, Object> tags);
public static <T> T removeTag(String name);
public static void removeTags();

Below example shows how to tag a Lambda invocation.

Adding Tags
import io.thundra.agent.lambda.core.invocation.InvocationSupport;
...
InvocationSupport.setTag('string-tag', 'thundra');
InvocationSupport.setTag('numeric-tag', 123);
InvocationSupport.setTag('boolean-tag', true);
InvocationSupport.setTag('object-tag', new User(username, email, ...));
...

Adding Application Tags

You can add application tags via environment variables. All application tags which start with thundra_agent_application_tag_ are parsed by Thundra's Java agent and the part after thundra_agent_application_tag_ prefix is used as the key of the tag and the value of the environment variable becomes the value of the tag. For example, thundra_agent_application_tag_floatField with value 12.123 will add an application tag to all data with key floatField and value 12.123.

For now, only primitive String, Number and Boolean typed tag values can be searched. Other complex typed (List, Set, Map, Object, ...) tags values cannot be searched but can be seen in the application details