Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

OpenTelemetry Lambda .NET Example

This repo contains a simple AWS Lambda .NET function instrumented with OpenTelemetry.

Prerequisites

This example assumes you have the following:

It also assumes you have the following installed:

Run

Set the following environment variable:

export NEW_RELIC_LICENSE_KEY=<your license key here>

Replacing <your license key here> with your New Relic license key.

Then build the example function:

sam build

Then deploy it to your AWS account:

sam deploy \
    --capabilities CAPABILITY_NAMED_IAM \
    --parameter-overrides "newRelicLicenseKey=${NEW_RELIC_LICENSE_KEY}" \
    --resolve-s3 \
    --stack-name newrelic-example-opentelemetry-lambda-dotnet

The deploy will output an apiEndpoint which you can use to invoke the function:

curl https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/api/

View your data in the New Relic UI

After invoking the function you should see newrelic-example-opentelemetry-lambda-dotnet under Services - OpenTelemetry in your New Relic account.