Skip to content
Merged
10 changes: 5 additions & 5 deletions cid-redirects.json
Original file line number Diff line number Diff line change
Expand Up @@ -1524,9 +1524,9 @@
"/Traces/01Getting_Started_with_Transaction_Tracing/Set_up_traces_collection_for_Kubernetes_environments": "/docs/apm/traces/get-started-transaction-tracing/set-up-traces-collection-for-kubernetes-environments",
"/Traces/01Getting_Started_with_Transaction_Tracing/Set_up_traces_collection_for_other_environments": "/docs/apm/traces/get-started-transaction-tracing/set-up-traces-collection-for-other-environments",
"/Traces/01Getting_Started_with_Transaction_Tracing/01Instrument_your_application_with_OpenTelemetry": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation",
"/Traces/01Getting_Started_with_Transaction_Tracing/01Instrument_your_application_with_OpenTelemetry/.NET_OpenTelemetry_auto-instrumentation": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/net",
"/Traces/01Getting_Started_with_Transaction_Tracing/01Instrument_your_application_with_OpenTelemetry/.NET_OpenTelemetry_auto-instrumentation/01NET_Core_TraceID_and_SpanID_Injection_into_Logs": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/net/traceid-spanid-injection-into-logs",
"/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/java",
"/Traces/01Getting_Started_with_Transaction_Tracing/01Instrument_your_application_with_OpenTelemetry/.NET_OpenTelemetry_auto-instrumentation": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/dotnet",
"/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/net": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/dotnet",
"/Traces/01Getting_Started_with_Transaction_Tracing/01Instrument_your_application_with_OpenTelemetry/.NET_OpenTelemetry_auto-instrumentation/01NET_Core_TraceID_and_SpanID_Injection_into_Logs": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/dotnet/traceid-spanid-injection-into-logs",
"/Traces/01Getting_Started_with_Transaction_Tracing/01Instrument_your_application_with_OpenTelemetry/AWS_Lambda_-_Java_function_instrumentation_with_Sumo_Logic_tracing": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/java",
"/Traces/01Getting_Started_with_Transaction_Tracing/01Instrument_your_application_with_OpenTelemetry/AWS_Lambda_-_NodeJS_function_instrumentation_with_Sumo_Logic_tracing": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/nodejs",
"/Traces/01Getting_Started_with_Transaction_Tracing/01Instrument_your_application_with_OpenTelemetry/AWS_Lambda_-_Python_function_instrumentation_with_Sumo_Logic_tracing": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/python",
Expand All @@ -1541,7 +1541,7 @@
"/docs/apm/traces/get-started-transaction-tracing/go": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/go",
"/docs/apm/traces/get-started-transaction-tracing/java": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/java",
"/docs/apm/traces/get-started-transaction-tracing/javascript": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/javascript",
"/docs/apm/traces/get-started-transaction-tracing/net": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/net",
"/docs/apm/traces/get-started-transaction-tracing/net": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/dotnet",
"/Traces/01Getting_Started_with_Transaction_Tracing/01Instrument_your_application_with_OpenTelemetry/Python_OpenTelemetry_auto-instrumentation": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/python",
"/Traces/01Getting_Started_with_Transaction_Tracing/01Instrument_your_application_with_OpenTelemetry/Ruby_on_Rails_OpenTelemetry_auto-instrumentation": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/ruby-on-rails",
"/Traces/01Getting_Started_with_Transaction_Tracing/01Instrument_your_application_with_OpenTelemetry/Ruby_OpenTelemetry_auto-instrumentation": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/ruby",
Expand Down Expand Up @@ -4277,7 +4277,7 @@
"/Traces/Getting_Started_with_Transaction_Tracing/Set_up_traces_collection_for_other_environments": "/docs/apm/traces/get-started-transaction-tracing/set-up-traces-collection-for-other-environments",
"/Traces/Getting_Started_with_Transaction_Tracing/Working_with_spans_attributes": "/docs/apm/traces/advanced-configuration/working-with-span-attributes",
"/Traces/Getting_Started_with_Transaction_Tracing/Instrument_your_application_with_OpenTelemetry": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation",
"/Traces/Getting_Started_with_Transaction_Tracing/Instrument_your_application_with_OpenTelemetry/.NET_OpenTelemetry_auto-instrumentation": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/net",
"/Traces/Getting_Started_with_Transaction_Tracing/Instrument_your_application_with_OpenTelemetry/.NET_OpenTelemetry_auto-instrumentation": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/dotnet",
"/Traces/Getting_Started_with_Transaction_Tracing/Instrument_your_application_with_OpenTelemetry/Java_OpenTelemetry_auto-instrumentation/TraceId_and_SpanId_injection_into_logs_configuration": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/java/traceid-spanid-injection-into-logs-configuration",
"/Traces/Getting_Started_with_Transaction_Tracing/Instrument_your_application_with_OpenTelemetry/Go_OpenTelemetry_auto-instrumentation": "/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/go",
"/Traces/Getting_Started_with_Transaction_Tracing/Set_up_traces_collection_for_Kubernetes_environments": "/docs/apm/traces/get-started-transaction-tracing/set-up-traces-collection-for-kubernetes-environments",
Expand Down
2 changes: 1 addition & 1 deletion docs/apm/traces/advanced-configuration/correlate-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Our configurations, available in several programming languages, will inject the
<div className="box smallbox card">
<div className="container">
<img src='https://upload.wikimedia.org/wikipedia/commons/thumb/e/ee/.NET_Core_Logo.svg/512px-.NET_Core_Logo.svg.png' alt="Thumbnail icon" width="60"/>
<h4><a href="/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/net/traceid-spanid-injection-into-logs">.NET</a></h4>
<h4><a href="/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/dotnet/traceid-spanid-injection-into-logs">.NET</a></h4>
<p>Injects data into user logs from ASP.NET & .NET core.</p>
</div>
</div>
Expand Down
8 changes: 7 additions & 1 deletion docs/apm/traces/get-started-transaction-tracing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Learn how to collect telemetry data from applications written in the following p
<div className="box smallbox card">
<div className="container">
<img src='https://upload.wikimedia.org/wikipedia/commons/thumb/e/ee/.NET_Core_Logo.svg/512px-.NET_Core_Logo.svg.png' alt="Thumbnail icon" width="55"/>
<h4><a href="/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/net">.NET</a></h4>
<h4><a href="/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/dotnet">.NET</a></h4>
</div>
</div>
<div className="box smallbox card">
Expand Down Expand Up @@ -118,6 +118,12 @@ Learn how to install and configure OpenTelemetry distributed tracing for AWS Lam
<img src='https://upload.wikimedia.org/wikipedia/commons/c/c3/Python-logo-notext.svg' alt="Thumbnail icon" width="50"/>
<h4><a href="/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/python">Python</a></h4>
</div>
</div>
<div className="box smallbox card">
<div className="container">
<img src='https://upload.wikimedia.org/wikipedia/commons/thumb/e/ee/.NET_Core_Logo.svg/512px-.NET_Core_Logo.svg.png' alt="Thumbnail icon" width="55"/>
<h4><a href="/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/dotnet">Dotnet</a></h4>
</div>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
id: dotnet
title: AWS Lambda - .NET Function Instrumentation
sidebar_label: .NET
description: Learn how to install and configure OpenTelemetry distributed tracing for AWS .NET-based Lambda functions and send data to Sumo Logic.
---

import useBaseUrl from '@docusaurus/useBaseUrl';
import ApmTrace from '../../../../../reuse/apm-traces-layer-order.md';

This document covers how to install and configure OpenTelemetry distributed tracing for AWS Lambda functions based on .NET and send the data to Sumo Logic.

To obtain tracing data from AWS Lambda functions developed in .NET, you can use the following components

### Provided SDK

[OpenTelemetry Lambda SDK for .NET](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Instrumentation.AWSLambda) includes tracing APIs to instrument Lambda handlers and is provided on [NuGet](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AWSLambda).

### OpenTelemetry Lambda layer

[OpenTelemetry Lambda Layer for Collector](https://github.com/open-telemetry/opentelemetry-lambda/tree/main/collector#opentelemetry-collector-aws-lambda-extension-layer) includes OpenTelemetry Collector for Lambda components. Apply this layer to your Lambda handler that's already been instrumented with the OpenTelemetry Lambda .NET SDK to enable end-to-end tracing.

#### .NET Lambda layer supports

* .NET 6 SDK or later
* x86_64 and arm64 architectures

### Lambda function requirements

You'll need the following:

* .NET 6 SDK or later
* Lambda layers add permissions
* Sumo Logic OTLP/HTTP Source endpoint URL - To send spans from the instrumented Lambda function to Sumo Logic you need an endpoint URL from an existing or new [OTLP/HTTP source](/docs/send-data/hosted-collectors/http-source/otlp).

## Quick Start

### Overview

<img src={useBaseUrl('img/apm/traces/lambda-dotnet-overview.png')} alt=".NET Lambda Overview" style={{border: '1px solid gray'}} width="800" />

### Prerequisites

* AWS CLI configured with appropriate permissions
* Configure the [AWS credential](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)
* .NET 6 SDK
* Sumo Logic OTLP endpoint URL

### Configure the lambda function

Navigate to [functions](https://console.aws.amazon.com/lambda/home#/functions) in the AWS Lambda Console and open the function you want to instrument.

* Navigate to the **Layers** section and click **Add a layer**.
Use the following upstream [collector lambda layer](https://github.com/open-telemetry/opentelemetry-lambda/tree/main?tab=readme-ov-file#latest-layer-versions)

* `arn:aws:lambda:<region>:184161586896:layer:opentelemetry-collector-<amd64|arm64>-<version>:1`

* In the **Choose a layer** menu, select **Specify an ARN** and paste the above ARN ID for your Lambda function
:::note
Lambda layers are a regionalized resource, meaning that they can only be used in the Region in which they are published. Make sure to use the layer in the same region as your Lambda functions.
:::

By default, OpenTelemetry Collector Lambda layer exports telemetry data to AWS backends. To customize the collector configuration, add a collector.yaml to your function and specify its location via the `OPENTELEMETRY_COLLECTOR_CONFIG_URI` environment file.

* Configure the collector layer to send data to SumoLogic:

```yaml
receivers:
otlp:
protocols:
grpc:
endpoint: localhost:4317
http:
endpoint: localhost:4318

exporters:
otlphttp:
endpoint: ${SUMO_LOGIC_OTLP_ENDPOINT}
headers:
Content-Type: application/x-protobuf
encoding: proto

service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlphttp]
```

Once the file has been deployed with a Lambda, configuring the `OPENTELEMETRY_COLLECTOR_CONFIG_URI` will tell the OpenTelemetry extension where to find the collector configuration:

```bash
aws lambda update-function-configuration --function-name Function --environment Variables={OPENTELEMETRY_COLLECTOR_CONFIG_URI=/var/task/collector.yaml}
```

* Configure the following environment variables:

Navigate to the **Configuration > Environment variables** section and ensure that the following environment variables are setup:

| Variable | Value | Purpose |
|:---------|:------|:--------|
| `OTEL_EXPORTER_OTLP_ENDPOINT` | `localhost:4318` | Collector endpoint |
| `OTEL_EXPORTER_OTLP_PROTOCOL` | `http/protobuf` | Export protocol |
| `AWS_LAMBDA_EXEC_WRAPPER` | `/opt/otel-instrument` | Lambda wrapper |
| `SUMO_LOGIC_OTLP_ENDPOINT` | `https://your-endpoint.sumologic.net/receiver/v1/otlp/YOUR_TOKEN/v1/traces` | Sumo Logic endpoint |
| `OPENTELEMETRY_COLLECTOR_CONFIG_URI` | `/var/task/collector.yaml` | Collector configuration |

Any other environment variables like `OTEL_RESOURCE_ATTRIBUTES` or `OTEL_SERVICE_NAME` could also be configured.

Your function should be successfully instrumented. Invoke the function and find your traces in the [Sumo Logic Tracing screen](/docs/apm/traces/view-and-investigate-traces)

## References

* [OpenTelemetry Lambda Layer Documentation](https://github.com/open-telemetry/opentelemetry-lambda)
* [Sumo Logic OTLP Integration](https://help.sumologic.com/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/)
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
slug: /apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda
title: AWS Lambda Instrumentation
sidebar_label: AWS Lambda
description: Learn how to install and configure OpenTelemetry distributed tracing for AWS Lambda functions and send data to Sumo Logic.
---

import useBaseUrl from '@docusaurus/useBaseUrl';

<img src={useBaseUrl('img/connection-and-integration/aws-lambda.svg')} alt="Thumbnail icon" width="45"/>

In this section, you'll learn how to install and configure OpenTelemetry distributed tracing for AWS Lambda functions written in various programming languages and send that data to Sumo Logic.

<div className="box-wrapper" markdown="1">
<div className="box smallbox card">
<div className="container">
<a href="/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/dotnet"><img src='https://upload.wikimedia.org/wikipedia/commons/thumb/e/ee/.NET_Core_Logo.svg/512px-.NET_Core_Logo.svg.png' alt="Thumbnail icon" width="55"/><h4>.NET</h4></a>
</div>
</div>
<div className="box smallbox card">
<div className="container">
<a href="/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/java"><img src='https://upload.wikimedia.org/wikipedia/en/thumb/3/30/Java_programming_language_logo.svg/131px-Java_programming_language_logo.svg.png' alt="Thumbnail icon" width="30"/><h4>Java</h4></a>
</div>
</div>
<div className="box smallbox card">
<div className="container">
<a href="/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/nodejs"><img src='https://upload.wikimedia.org/wikipedia/commons/d/d9/Node.js_logo.svg' alt="Thumbnail icon" width="95"/><h4>Node.js</h4></a>
</div>
</div>
<div className="box smallbox card">
<div className="container">
<a href="/docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/python"><img src='https://upload.wikimedia.org/wikipedia/commons/c/c3/Python-logo-notext.svg' alt="Thumbnail icon" width="50"/><h4>Python</h4></a>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
slug: /apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/net
slug: /apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/dotnet
title: .NET OpenTelemetry Auto-Instrumentation
sidebar_label: OpenTelemetry Auto-Instrumentation
description: The simplest way to start capturing telemetry data is to implement the solution coming from OpenTelemetry-dotNet.
Expand Down
8 changes: 5 additions & 3 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1816,7 +1816,9 @@ module.exports = {
label: 'AWS Lambda',
collapsible: true,
collapsed: true,
link: {type: 'doc', id: 'apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/index'},
items: [
'apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/dotnet',
'apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/java',
'apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/nodejs',
'apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/python',
Expand Down Expand Up @@ -1861,8 +1863,8 @@ module.exports = {
collapsible: true,
collapsed: true,
items: [
'apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/net/index',
'apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/net/traceid-spanid-injection-into-logs',
'apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/dotnet/index',
'apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/dotnet/traceid-spanid-injection-into-logs',
],
},
{
Expand Down Expand Up @@ -3115,7 +3117,7 @@ integrations: [
'api/about-apis/terraform-with-sumo-logic',
'api/about-apis/troubleshooting',
],
},
},
'api/access-keys',
'api/account-management',
'api/app-management',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.