-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add instrumentation for AWS Lambda Service - pkg metadata files (Part 1/2) #739
Add instrumentation for AWS Lambda Service - pkg metadata files (Part 1/2) #739
Conversation
b2b0422
to
fc943f4
Compare
fc943f4
to
0f15526
Compare
ecebc7a
to
6f99ec4
Compare
...elemetry-instrumentation-aws_lambda/src/opentelemetry/instrumentation/aws_lambda/__init__.py
Outdated
Show resolved
Hide resolved
301d2bc
to
3fc7fff
Compare
3fc7fff
to
7cb3428
Compare
...elemetry-instrumentation-aws_lambda/src/opentelemetry/instrumentation/aws_lambda/__init__.py
Outdated
Show resolved
Hide resolved
a710b10
to
7c0787b
Compare
instrumentation/opentelemetry-instrumentation-aws_lambda/scripts/otel-instrument
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: How would this work if the lambda uses a framework like flask or falcon? Wouldn't that result in two SERVER spans?
instrumentation/opentelemetry-instrumentation-aws_lambda/setup.cfg
Outdated
Show resolved
Hide resolved
...elemetry-instrumentation-aws_lambda/src/opentelemetry/instrumentation/aws_lambda/__init__.py
Outdated
Show resolved
Hide resolved
...elemetry-instrumentation-aws_lambda/src/opentelemetry/instrumentation/aws_lambda/__init__.py
Outdated
Show resolved
Hide resolved
...elemetry-instrumentation-aws_lambda/src/opentelemetry/instrumentation/aws_lambda/__init__.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aiohttp-client
uses -
as the separate but this PR is using _
i.e, aws_lambda
instead of aws-lambda
. Can we use aws-lambda instead?
with tracer.start_as_current_span( | ||
name=orig_handler_name, | ||
context=parent_context, | ||
kind=SpanKind.SERVER, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the lambda was triggered by SQS/SNS/Kinesis/S3/etc? It would be a consumer span in that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this conversation to #777 (comment)
...telemetry-instrumentation-aws_lambda/src/opentelemetry/instrumentation/aws_lambda/package.py
Outdated
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-aws_lambda/README.rst
Outdated
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-aws_lambda/setup.cfg
Outdated
Show resolved
Hide resolved
7c0787b
to
2a20f4d
Compare
05a8c46
to
1d984e8
Compare
opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py
Show resolved
Hide resolved
Sorry for the trouble but any chance we can convert this into PR number 2 with all the code and create a new PR with the package skeleton? 😬 Only asking because we already started a review on this and it'd be weird to have these discussions in the wrong place. Happy to copy all the comments and add them to another PR though if it is too much trouble. |
Oh I was going to copy all your Python code related comments to #777! It's pretty dependent on this PR so I thought it would be best to merge this one first 🙂 If you prefer to make this PR the "Python code" PR we can do that instead though? Let me know! |
Whatever is easier for you @NathanielRN |
1d984e8
to
657c2b1
Compare
Description
In this PR, we ONLY add package metadata files.
This PR adds Instrumentation for Lambda functions on the AWS Lambda service. Specifically, when you use AWS Lambda to call your
def lambda_handler(lambda_event, lambda_context)
on AWS, you can use this instrumentation package and its scripts to instrument that invocation with OpenTelemetry!OpenTelemetry already hosts this code on the OpenTelemetry Lambda repository, but it has a
TODO
to migrate it here, to the OpenTelemetry Python Contrib repository.Instrumenting AWS Lambda is defined in the OpenTelemetry specifications and "AWS Lambda Instrumentations" also already exist in other languages:
You can learn more about how they are used on the AWS Distro for OpenTelemetry - Python Lambda Layer documentation
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
N/A
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.