Deployment Integrations
On-premise Integrations
Platform Integrations

Tagging

With Thundra's .NET agent, you can add custom tags to your invocations or your applications which will let you eventually better filter the data.

Tagging Invocations

You can add custom tags to your invocation with the help static methods of Thundra.Agent.Lambda.Core.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:

InvocationSupport.cs
public static string InvocationId;
public static Dictionary<string, object> GetTags();
public static void SetTag(string key, object value);
public static object GetTag(string key);
public static void SetError(Exception error);
public static Exception GetError();
public static void ClearTag(string key);

Below example shows an example usage of the InvocationSupport class:

using Thundra.Agent.Lambda.Core.InvocationSupport;
...
Console.WriteLine(InvocationSupport.InvocationId);
InvocationSupport.SetTag("user-id", 1980);
InvocationSupport.SetTag("user-name", "Dudley Dursley");
InvocationSupport.SetTag("is-muggle", true);
InvocationSupport.SetError(new UserException("Muggles not allowed"));

Set error to manually created OpenTracing Span

Thundra.Agent.Lambda.Core.SpanSupport is for to tag a custom span, that is created via OpenTracing API, as erroneous. You can check Enrich Tracing page to see how to create custom spans to enrich your monitoring experience.

using (IScope updateEntityScope =
GlobalTracer.Instance.BuildSpan("UpdateEntity")
.StartActive(finishSpanOnDispose: true))
{
try
{
DoRiskyThings();
}
catch(Exception e)
{
SpanSupport.SetError(updateEntityScope.Span, e);
throw e;
}
}