Skip to content

Commit 240fae1

Browse files
Add OPENTELEMETRY_COLLECTOR_CONFIG_URI to the environment variables
1 parent 922a6e2 commit 240fae1

File tree

1 file changed

+9
-5
lines changed
  • docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda

1 file changed

+9
-5
lines changed

docs/apm/traces/get-started-transaction-tracing/opentelemetry-instrumentation/aws-lambda/dotnet.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ You'll need the following:
5252
* .NET 6 SDK
5353
* Sumo Logic OTLP endpoint URL
5454

55-
### Configure the Collector Lambda layer
55+
### OpenTelemetry Collector Lambda layer
5656

5757
Use the following upstream [collector lambda layer](https://github.com/open-telemetry/opentelemetry-lambda/tree/main?tab=readme-ov-file#latest-layer-versions)
5858

@@ -61,6 +61,7 @@ Use the following upstream [collector lambda layer](https://github.com/open-tele
6161
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.
6262

6363
* Configure the collector layer to send data to SumoLogic:
64+
6465
```yaml
6566
receivers:
6667
otlp:
@@ -83,10 +84,6 @@ Use the following upstream [collector lambda layer](https://github.com/open-tele
8384
receivers: [otlp]
8485
exporters: [otlphttp]
8586
```
86-
* Set the following environment variables:
87-
| Variable | Value | Purpose |
88-
|:---------|:------|:--------|
89-
| `SUMO_LOGIC_OTLP_ENDPOINT` | `https://your-endpoint.sumologic.net/receiver/v1/otlp/YOUR_TOKEN/v1/traces` | Sumo Logic endpoint |
9087
9188
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:
9289

@@ -104,11 +101,18 @@ Navigate to [functions](https://console.aws.amazon.com/lambda/home#/functions)
104101
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.
105102
:::
106103
* Configure the following environment variables:
104+
105+
Navigate to the **Configuration > Environment variables** section and ensure that the following environment variables are setup:
106+
107107
| Variable | Value | Purpose |
108108
|:---------|:------|:--------|
109109
| `OTEL_EXPORTER_OTLP_ENDPOINT` | `localhost:4318` | Collector endpoint |
110110
| `OTEL_EXPORTER_OTLP_PROTOCOL` | `http/protobuf` | Export protocol |
111111
| `AWS_LAMBDA_EXEC_WRAPPER` | `/opt/otel-instrument` | Lambda wrapper |
112+
| `SUMO_LOGIC_OTLP_ENDPOINT` | `https://your-endpoint.sumologic.net/receiver/v1/otlp/YOUR_TOKEN/v1/traces` | Sumo Logic endpoint |
113+
| `OPENTELEMETRY_COLLECTOR_CONFIG_URI` | `/var/task/collector.yaml` | Collector configuration |
114+
115+
Any other environment variables like `OTEL_RESOURCE_ATTRIBUTES` or `OTEL_SERVICE_NAME` could also be configured.
112116

113117
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)
114118

0 commit comments

Comments
 (0)