getsentry / getsentry/sentry-javascript

Automatically instrument profiling for Node and Python when Sentry is set up via the Lambda Layer

Abierto
#11,800 7 comentarios 0 reacciones 0 asignados Ver en GitHub
AWS Lambda Feature: Serverless Improvement Profiles
Lenguaje dominante
TypeScript
Estrellas
8.7k
Forks
1.8k
Merge medio
1 d 17 h
PR fusionados (30 d)
515

Descripción

### Problem Statement

Currently the [Lambda Layer setup instructions for serverless functions](https://docs.sentry.io/platforms/python/integrations/aws-lambda/manual-layer/#configuration-options) suggest that errors and performance is automatically enabled:

> You can configure Sentry by setting these environment variables for your Lambda function:
> `SENTRY_INITIAL_HANDLER`: The handler function of your AWS Lambda funtion.
> `SENTRY_DSN`: This is set to the [DSN](https://docs.sentry.io/product/sentry-basics/concepts/dsn-explainer/) of your project
> `SENTRY_TRACES_SAMPLE_RATE`: This sets the [sampling rate](https://docs.sentry.io/platforms/python/configuration/sampling/#sampling-transaction-events) for transactions.

(I assume this applies to both Node and Python. [The Node lambda layer docs](https://docs.sentry.io/platforms/javascript/guides/aws-lambda/layer/) are not explicit about what you get out of the box)

Beyond the above, though, it seems profiling has to be manually set up [for Node lambdas](https://docs.sentry.io/platforms/javascript/guides/aws-lambda/profiling/#enabling-profiling) and I believe also [for Python lambdas](https://docs.sentry.io/platforms/python/profiling/). This manual step can be difficult when a customer has, say 1000 lambdas and doesn't want to instrument them all with profiling individually.

### Solution Brainstorm

Add a configuration option for Node and Python profiling in the lambda layer.

### Product Area

Profiling

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.