Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ This repo contains various example on how to integrate with CodeSee
`sst-cdk-lambda-layer-example` - Show you example Serverless Stack + CDK to integrate with CodeSee Lambda Layer

`serverless-al2-example` - Show you example Serverless + Golang + Amazon Linux 2 + CodeSee Lambda Layer

`serverless-lambda-otel-example` - Show you example Serverless + Lambda + Open Telemetry integration
15 changes: 15 additions & 0 deletions serverless-lambda-otel-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# serverless-lambda-otel-example

Example Serverless + Lambda + Open Telemetry integration

## Install packages

```
npm i
```

## Deploy Lambda

```
sls deploy
```
19 changes: 19 additions & 0 deletions serverless-lambda-otel-example/collector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
receivers:
otlp:
protocols:
grpc:
endpoint: localhost:4317
http:
endpoint: localhost:4318

exporters:
otlp/codesee:
endpoint: "in-otel.codesee.io:443"
headers:
Authorization: "Bearer XXX"

service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlp/codesee]
14 changes: 14 additions & 0 deletions serverless-lambda-otel-example/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports.handler = async (event) => {

return {
statusCode: 200,
body: JSON.stringify(
{
message: "hello from serverless-lambda-otel-example lambda",
input: event,
},
null,
2
),
};
};
Loading