feat(aws-lambda): Add exec. environment and invocation attributes

Offen
#8,080 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
aws, python

Rechercherichtung

Start by reading the AWS Lambda integration and its tests in sentry-python; the issue does not name specific files or test paths. Check the linked sentry-conventions#730 dependency before work. Done means environment attributes are cached once and invocation attributes reflect cold starts, timing, remaining time, and the CloudWatch logs URL.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Feature Integration: AWS Lambda Python Traces

Cold starts and durations are invisible on spans: duration, remaining time and the CloudWatch URL are only added as extras to error events.

Cold starts and durations are currently invisible and only added as extras to error events. Add the following attributes:

Environment (cached once)

  • faas.instance: log stream name
  • faas.max_memory: AWS_LAMBDA_FUNCTION_MEMORY_SIZE × 1,048,576
  • faas.entry_point: _HANDLER
  • aws.lambda.initialization_type: AWS_LAMBDA_INITIALIZATION_TYPE

Invocation

  • faas.coldstart: true on the first invocation in the environment
  • aws.lambda.proactive_initialization: true on a first invocation that starts > 10 s after the SDK loaded (no request waited for the init)
  • aws.lambda.execution_duration_in_millis / faas.duration_in_ms: handler duration
  • aws.lambda.remaining_time_in_millis: at invocation end
  • aws.cloudwatch.logs.url

Depends on getsentry/sentry-conventions#730

Vorherrschende Sprache
Python
Sterne
2.2k
Forks
713
Ø Merge
1 T. 16 Min.
Gemergte PRs (30 T.)
113

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus getsentry/sentry-python

Alle Issues in getsentry/sentry-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.