Fix AWS Lambda documentation (#1693)
Fix `ImportError: cannot import name 'AwsBotocoreInstrumentor' from 'opentelemetry.instrumentation.botocore'` Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
This commit is contained in:
parent
7ffbfc302e
commit
d6a024302e
|
|
@ -24,11 +24,11 @@ Usage
|
||||||
# Copy this snippet into an AWS Lambda function
|
# Copy this snippet into an AWS Lambda function
|
||||||
|
|
||||||
import boto3
|
import boto3
|
||||||
from opentelemetry.instrumentation.botocore import AwsBotocoreInstrumentor
|
from opentelemetry.instrumentation.botocore import BotocoreInstrumentor
|
||||||
from opentelemetry.instrumentation.aws_lambda import AwsLambdaInstrumentor
|
from opentelemetry.instrumentation.aws_lambda import AwsLambdaInstrumentor
|
||||||
|
|
||||||
# Enable instrumentation
|
# Enable instrumentation
|
||||||
AwsBotocoreInstrumentor().instrument()
|
BotocoreInstrumentor().instrument()
|
||||||
AwsLambdaInstrumentor().instrument()
|
AwsLambdaInstrumentor().instrument()
|
||||||
|
|
||||||
# Lambda function
|
# Lambda function
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue