Giter Club home page Giter Club logo

aws-otel-python's People

Contributors

alolita avatar amazon-auto avatar bryan-aguilar avatar dependabot[bot] avatar erichsueh3 avatar humivo avatar nathanielrn avatar rajpratik71 avatar vasireddy99 avatar wangzlei avatar wytrivail avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-otel-python's Issues

Performance Threshold breached AFTER Soak Tests completed for the (flask, auto) Sample App

Description

After the Soak Tests completed, a performance degradation was revealed for commit 01c4956 of the refs/heads/main branch for the (flask, auto) Sample App. Check out the Action Logs from the Soak Testing workflow run on GitHub to view the threshold violation.

Useful Links

Snapshots of the Soak Test run are available on the gh-pages branch. These are the snapshots for the violating commit:

CPU Load Soak Test SnapShot Image
Total Memory Soak Test SnapShot Image

The threshold violation should also be noticeable on our graph of Soak Test average results per commit.

Performance Threshold breached AFTER Soak Tests completed for the (flask, none) Sample App

Description

After the Soak Tests completed, a performance degradation was revealed for commit 01c4956 of the refs/heads/main branch for the (flask, none) Sample App. Check out the Action Logs from the Soak Testing workflow run on GitHub to view the threshold violation.

Useful Links

Snapshots of the Soak Test run are available on the gh-pages branch. These are the snapshots for the violating commit:

CPU Load Soak Test SnapShot Image
Total Memory Soak Test SnapShot Image

The threshold violation should also be noticeable on our graph of Soak Test average results per commit.

Publish `logging` instrumentation package that injects X-Ray styled Trace IDs into logs

Description

The AWS X-Ray developer guide talks about Trace ID Injection. Trace ID Injection allows services like CloudWatch Service to link X-Ray segments to X-Ray segment Service Graphs. This is accomplished by injecting the current AWS X-Ray segment Trace ID into the log that is sent to CloudWatch under the AWS-XRAY-TRACE-ID key (the key is not important since the query is done on the Trace ID, but this is just an example). For example, as seen in the docs:

2019-09-10 18:58:30.844 [nio-5000-exec-4]  AWS-XRAY-TRACE-ID: 1-5d77f256-19f12e4eaa02e3f76c78f46a@1ce7df03252d99e1 WARN 1 - Your logging message here

The problem is, that we do not currently have a package that does this. This is unlike ADOT Java, which publishes a package for log4j and other logging libraries as well.

We should distribute a package like this which gives an OpenTelemetry Instrumentor that injects X-Ray formatted Trace IDs from the current OpenTelemetry Python span. Since we want to do X-Ray specific Trace IDs, the package should be hosted in this repo and not OTel Python Contrib.

NOTE: We need to set up publishing to PIP before we can work on this issue.

Performance Threshold breached AFTER Soak Tests completed for the (flask, none) Sample App

Description

After the Soak Tests completed, a performance degradation was revealed for commit 8680fa3 of the refs/heads/main branch for the (flask, none) Sample App. Check out the Action Logs from the Soak Testing workflow run on GitHub to view the threshold violation.

Useful Links

Snapshots of the Soak Test run are available on the gh-pages branch. These are the snapshots for the violating commit:

CPU Load Soak Test SnapShot Image
Total Memory Soak Test SnapShot Image

The threshold violation should also be noticeable on our graph of Soak Test average results per commit.

Lack of context propagation (traceid/spanid) in case of SQS queue (boto instrumentation)

Description
In case of architecture:

  • function A (AWS Lambda Python)
  • SQS queue
  • function B (AWS Lambda Python)

Flow:

  1. Function A by boto library sends a message to SQS queue
  2. Function B - trigger set as SQS queue and function makes a call to RDS (postgres)

Both functions are auto instrumented by AWS ADOT Instrumentation deployed as Lambda layer

Expected behaviour:
Only 1 trace with:

  • client span related to sending message to SQS queue
  • consumer span related to lambda hander method (function b)
  • client span related to rds call

Current behaviour:
There are two separated traces:

  • First from Function A with a CLIENT span (sending message to SQS queue)
  • Second from Function B but only with span related to RDS call

Note:
What I found is lack of AWSTraceHeader in SQS attributes for AWS OTEL Python Instrumentation. I believe this attribute is responsible for context propagation.
When AWS X Ray is used as tracing then AWSTraceHeader is set.

Auto Instrumentation Sample App Cannot Provide Metrics

Currently, the sample app in this repo which tests automatic instrumentation with Flask (i.e. sample-apps/auto-instrumentation/flask) cannot provide Metrics because automatic Metric tracing is not yet supported in OpenTelmetry Python. See the issue here.

This means we have a 2 code changes to do in the app once that issue is resolved:

# TODO: Once https://github.com/open-telemetry/opentelemetry-python/issues/1444
# is resolved, move this line to only exist in `manual-instrumentation` apps.
metrics.set_meter_provider(MeterProvider())

# TODO: Auto Instrumentation will instantiate the MeterProvider before this
# file has a chance to instantiate it. Once https://github.com/open-telemetry/opentelemetry-python/issues/1444
# is resolved, this try except block can be removed.
try:
metrics.get_meter_provider().start_pipeline(meter, exporter, 5)
except:
logger.exception("Failed to start Metrics Pipeline!")
pass

Using AWS resource detector with Python auto-instrumentation

Hello, I opened an issue regarding this on the opentelemetry-python-contrib repo but thought it would also be relevant here since it would be helpful to add instructions to this documentation.

I am trying to use the new OTEL_EXPERIMENTAL_RESOURCE_DETECTORS environment variable (introduced in open-telemetry/opentelemetry-python#3181) with the AWS resource detectors in opentelemetry-sdk-extension-aws but it is not detecting the resource detectors.

Please see this issue for more information: open-telemetry/opentelemetry-python-contrib#2370

Performance Threshold breached AFTER Soak Tests completed for the (flask, manual) Sample App

Description

After the Soak Tests completed, a performance degradation was revealed for commit 8a92ecf of the refs/heads/main branch for the (flask, manual) Sample App. Check out the Action Logs from the Soak Testing workflow run on GitHub to view the threshold violation.

Useful Links

Snapshots of the Soak Test run are available on the gh-pages branch. These are the snapshots for the violating commit:

CPU Load Soak Test SnapShot Image
Total Memory Soak Test SnapShot Image

The threshold violation should also be noticeable on our graph of Soak Test average results per commit.

Improving Customer Experience with AWS X-Ray Auto Instrumentation Wrapper

Problem Description

For OTel Python right now, if someone wants to use OTel SDK to send traces to AWS X-Ray, there are many packages that they have to install & environment variables they have to set. Even with auto instrumentation from OpenTelemetry Python, there are many packages to install to get started tracing with AWS X-Ray:

i.e.

boto3
requests==2.23.0
Flask==1.1.2

opentelemetry-api==0.16b1
opentelemetry-sdk==0.16b1
opentelemetry-instrumentation==0.16b1
opentelemetry-exporter-otlp==0.16b1
opentelemetry-sdk-extension-aws==0.16b1

We should consider writing a wrapper that will install all these packages for the customer and allow them to simply run the wrapper with config parameters to their needed settings. The wrapper will in turn run their application, which will make their application instrumented with OTel for AWS X-Ray.

Follow Up:

Some questions:

  • How can the user uninstall the wrapper and all the packages it installed/environment variables it set?

Related:

In other repos:

Performance Threshold breached AFTER Soak Tests completed for the (flask, manual) Sample App

Description

After the Soak Tests completed, a performance degradation was revealed for commit 01c4956 of the refs/heads/main branch for the (flask, manual) Sample App. Check out the Action Logs from the Soak Testing workflow run on GitHub to view the threshold violation.

Useful Links

Snapshots of the Soak Test run are available on the gh-pages branch. These are the snapshots for the violating commit:

CPU Load Soak Test SnapShot Image
Total Memory Soak Test SnapShot Image

The threshold violation should also be noticeable on our graph of Soak Test average results per commit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.