Skip to content

Instantly share code, notes, and snippets.

@jeffhollan
Created October 23, 2020 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffhollan/bcdf3569732e16ab464b5e6d7a6619af to your computer and use it in GitHub Desktop.
Save jeffhollan/bcdf3569732e16ab464b5e6d7a6619af to your computer and use it in GitHub Desktop.
TracingOptions
// this is what an output binding approach would do
// downsides are that everything added is only resolved once the execution finishes
// so the timestamps and stuff may be bad
namespace Company.Function
{
public class HttpTrigger
{
[FunctionName("HttpTrigger")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
[NewRelic("telemetryThing")] IAsyncCollector<TraceConfigProvider> _traceProvider)
{
await _traceProvider.AddAsync("foo");
return new OkObjectResult(responseMessage);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment