Comments (5)
I've confirmed that the extension is running now in the container but logs are never sent to external exporters. Logging and x-ray work fine but my Honeycomb exporter does not send events. I'm sort of at a loss for how to debug this and welcome any insight.
#collector.yaml in the root directory
#Set an environemnt variable 'OPENTELEMETRY_COLLECTOR_CONFIG_FILE' to '/var/task/collector.yaml'
receivers:
otlp:
protocols:
grpc:
http:
exporters:
logging:
loglevel: debug
awsxray:
otlp:
endpoint: api.honeycomb.io:443
headers:
"x-honeycomb-team": "someapikey"
"x-honeycomb-dataset": "some-dataset"
#enables output for traces to xray
service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlp, logging, awsxray]
Dockerfile
FROM alpine:latest as layer-copy
#ARG AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION:-"us-east-1"}
#ARG AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-""}
#ARG AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-""}
ENV AWS_DEFAULT_REGION=us-east-1
ENV AWS_ACCESS_KEY_ID=mykeyid
ENV AWS_SECRET_ACCESS_KEY=secret_access_key
RUN apk add aws-cli curl unzip
RUN mkdir -p /opt
RUN curl $(aws lambda get-layer-version-by-arn --arn arn:aws:lambda:\us-east-1:901920570463:layer:aws-otel-python38-ver-1-7-1:1 --query 'Content.Location' --output text) --output layer.zip
RUN unzip layer.zip -d /opt
RUN rm layer.zip
FROM public.ecr.aws/lambda/python:3.8 as application
RUN mkdir -p ${LAMBDA_TASK_ROOT}
WORKDIR ${LAMBDA_TASK_ROOT}
COPY hello_world/requirements.txt ${LAMBDA_TASK_ROOT}/requirements.txt
RUN pip3 install -r ${LAMBDA_TASK_ROOT}/requirements.txt
COPY hello_world/ ${LAMBDA_TASK_ROOT}/hello_world
COPY collector.yaml ${LAMBDA_TASK_ROOT}
WORKDIR /opt
COPY --from=layer-copy /opt .
EXPOSE 55680
EXPOSE 4317
EXPOSE 9464
EXPOSE 55681
CMD [ "hello_world.app.lambda_handler" ]
Lambda is built and deployed via SAM.
from aws-otel-lambda.
Is it possible that a role needs to be assigned to the lambda to allow the GRPC receiver to start up/connect? I haven't seen any thing confirming that but want to rule it out.
NOTE: I'm not trying to call any AWS services yet, just get the layer working inside a container to do basic logging.
from aws-otel-lambda.
Circling back on this, I've discovered that if the AWS_LAMBDA_EXEC_WRAPPER environment variable is set, the exhibited behavior is the timeout starting up the receiver. I deleted this env variable on a whim, leaving the OPENTELEMETRY_COLLECTOR_CONFIG_FILE env var intact and I now have logs being written.
However, I still do not have any events going to external exporters (Honeycomb specifically for some reason. I'm going to try and set up xray and see if the behavior is the same.
from aws-otel-lambda.
Turns out, I had a mistake in the value for AWS_LAMBDA_EXEC_WRAPPER. This was pointing to a non-existent location/script. Once I pointed this at /opt/otel-instrument, traces started flowing. Sorry for the trouble. You can close this issue.
from aws-otel-lambda.
Thanks for confirming @osiris43
from aws-otel-lambda.
Related Issues (20)
- Trace is broken in Lambda Java17 Runtime HOT 2
- Traces are not flushed to the server before the lambda terminates HOT 6
- Unable to access Lambda layer for Python with x86_64 architecture HOT 5
- docs: document of supported python version is old HOT 1
- 53612: bind: address already in use HOT 5
- [nodejs lambda layer] no metrics is exported to cloudwatch logs HOT 4
- Decouple processor needs to be added HOT 9
- Does not work with custom metrics HOT 4
- Request to include the awskinesisexporter HOT 3
- awsemf exporter won't create any log group, nor generating any metrics HOT 4
- Public ARN of aws-otel-nodejs-amd64 v1.18.1 is too large HOT 2
- Support for ES6 imports and exports when using aws-otel-nodejs lambda layer HOT 3
- Which version of the collector image contains https://github.com/open-telemetry/opentelemetry-lambda/pull/310? HOT 1
- ADOT Collector Dropping Exports in Lambda Environment HOT 4
- Question - ADOT Lambda Layer Nodejs - SQS AWSTraceHeader is not propogated to Lambda HOT 2
- mongodb spans not generated HOT 2
- Spans are broken if not using X-RAY
- ADOT Lambda Layer local testing HOT 1
- Unable to get tracecontext or trace-id using SDK API | NodeJs
- NodeJS Lambda Layer: X-Ray propagation not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-otel-lambda.