![]() |
VOOZH | about |
dotnet add package Lumigo.DotNET --version 1.0.51
NuGet\Install-Package Lumigo.DotNET -Version 1.0.51
<PackageReference Include="Lumigo.DotNET" Version="1.0.51" />
<PackageVersion Include="Lumigo.DotNET" Version="1.0.51" />Directory.Packages.props
<PackageReference Include="Lumigo.DotNET" />Project file
paket add Lumigo.DotNET --version 1.0.51
#r "nuget: Lumigo.DotNET, 1.0.51"
#:package Lumigo.DotNET@1.0.51
#addin nuget:?package=Lumigo.DotNET&version=1.0.51Install as a Cake Addin
#tool nuget:?package=Lumigo.DotNET&version=1.0.51Install as a Cake Tool
Easily trace your .NET Lambda functions using the Lumigo platform 🚀
Add the Lumigo tracer package via NuGet by running:
dotnet add package Lumigo.DotNET
Wrap your lambda function by implementing a supplier which contains your code:
using Lumigo.DotNET;
using Lumigo.DotNET.Instrumentation;
...
public class Function : LumigoRequestHandler
{
public Response FunctionHandler(string input, ILambdaContext context)
{
return Handle(input, context, () =>
{
//Your lambda code
//return <result>; - For void functions remove the return statements
});
}
}
using Lumigo.DotNET;
using Lumigo.DotNET.Instrumentation;
...
public class Function : LumigoRequestHandler
{
public async Task<Response> FunctionHandler(string input, ILambdaContext context)
{
return await Handle(input, context, async () =>
{
//Your lambda code
//return <result>; - For void functions remove the return statements
});
}
}
Execution tags allow you to dynamically add dimensions to your Lambda function invocations so that they can be identified, searched for, and filtered in Lumigo. They can be utilized to find specific invocations and create custom widgets, helping you simplify the complexity of monitoring distributed applications. The Quick Bytes video for Execution Tags video gives examples of use-cases for execution tags.
Adding an execution tag to a Lambda invocation is done via the LumigoRequestHandler.AddExecutionTag API:
using Amazon.Lambda.Core;
using Lumigo.DotNET;
using Lumigo.DotNET.Instrumentation;
using Lumigo.DotNET.Utilities.Extensions;
using System.Net.Http;
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))]
namespace HelloDotNet6 {
public class Function : LumigoRequestHandler
{
public async Task<string> Handler(string input, ILambdaContext context)
{
return await Handle(input, context, async () =>
{
this.AddExecutionTag("Key1", "Value1");
return "\"Hello world\"";
}
);
}
}
}
It is possible to set multiple execution tags for the same Lambda invocation, as well as multiple values for the same execution tag:
using Amazon.Lambda.Core;
using Lumigo.DotNET;
using Lumigo.DotNET.Instrumentation;
using Lumigo.DotNET.Utilities.Extensions;
using System.Net.Http;
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))]
namespace HelloDotNet6 {
public class Function : LumigoRequestHandler
{
public async Task<string> Handler(string input, ILambdaContext context)
{
return await Handle(input, context, async () =>
{
this.AddExecutionTag("Key1", "Value1");
this.AddExecutionTag("Key2", "Value2");
this.AddExecutionTag("Key2", "Value3");
return "\"Hello world\"";
}
);
}
}
}
Add LUMIGO_TRACER_TOKEN environment variable to connect the tracing to your Lumigo account.
To track HTTP requests add UseLumigo to the HTTP client:
using Amazon.Lambda.Core;
using Lumigo.DotNET;
using Lumigo.DotNET.Instrumentation;
using Lumigo.DotNET.Utilities.Extensions;
using System.Net.Http;
[assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))]
namespace HelloDotNet6 {
public class Function : LumigoRequestHandler
{
public async Task<string> Handler(string input, ILambdaContext context)
{
return await Handle(input, context, async () =>
{
HttpResponseMessage response = await new HttpClient().UseLumigo().GetAsync("https://httpbin.org/status/200");
response.EnsureSuccessStatusCode();
return "\"Hello world\"";
}
);
}
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.51 | 45,271 | 9/9/2024 |
| 1.0.50 | 307 | 9/8/2024 |
| 1.0.49 | 432 | 9/3/2024 |
| 1.0.48 | 398 | 9/1/2024 |
| 1.0.47 | 13,009 | 6/4/2023 |
| 1.0.46 | 342 | 5/15/2023 |
| 1.0.45 | 21,836 | 1/18/2023 |
| 1.0.44 | 467 | 1/18/2023 |
| 1.0.43 | 539 | 12/15/2022 |
| 1.0.42 | 449 | 12/14/2022 |
| 1.0.41 | 482 | 12/13/2022 |
| 1.0.40 | 7,190 | 12/13/2022 |
| 1.0.39 | 459 | 12/8/2022 |
| 1.0.38 | 702 | 10/2/2022 |
| 1.0.37 | 548 | 10/2/2022 |
| 1.0.36 | 767 | 1/4/2022 |
| 1.0.35 | 502 | 12/22/2021 |
| 1.0.34 | 506 | 12/16/2021 |
| 1.0.33 | 511 | 12/16/2021 |
| 1.0.32 | 488 | 12/16/2021 |