Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How to send distibuted traces to Datadog using ...

aereal
June 25, 2024

How to send distibuted traces to Datadog using build own OpenTelemetry-Lambda distribution

aereal

June 25, 2024
Tweet

More Decks by aereal

Other Decks in Programming

Transcript

  1. ࿩͢͜ͱ • AWS Lambda͔ΒOpenTelemetryΛ஻ͬͯDatadogʹτϨʔεΛૹΔํ๏ • AWS Lambda Extensionͷ֓ཁ • opentelemetry-lambdaͷ֓ཁ

    • AWS Distribution for OpenTelemetry Lambdaͱopentelemetry-lambdaͷؔ܎ • DatadogʹτϨʔεΛૹΔͨΊʹඞཁͳΧελϜϏϧυͷ஌ࣝ
  2. OTelͱLambda: opentelemetry-lambda • OTel collectorΛLambda Extensionͱͯ͠ಈ͔࣮͢૷ • Lambda Extension APIΛ஻ͬͯcollectorͷϓϩηεΛಈ͔͢

    • Layerͱͯ͠഑෍͞Ε͍ͯΔ • refs. https://docs.aws.amazon.com/lambda/latest/dg/chapter-layers.html
  3. AWS Lambda Extension • 2020೥ʹϦϦʔε͞Εͨؔ਺ຊମʹखΛೖΕͣؔ਺Λ֦ு͢ΔΤίγεςϜ • ॴఆͷҐஔʹόΠφϦΛஔ͍͓ͯ͘ͱInit, Restore, Invoke, ShutdownͦΕͧΕ

    ͷλΠϛϯάͰݺͼग़͞ΕΔ • InitΠϕϯτͰผϓϩηεΛ্ཱͪ͛ͨΓͳͲͰ͖Δ • ֦ுͷొ࿥ʹ͸࣮ߦ࣌ؒͷ੍໿͕͋Γ͜ΕΛ௒͑Δͱొ࿥ʹࣦഊ͠ɺͦͷ֦ு ͸࣮ߦ͞Εͳ͍ • ؔ਺ຊମͷ࣮ߦʹ͸Өڹ͠ͳ͍ɺ͋͘·Ͱແࢹ͞ΕΔ͚ͩ
  4. OTelͱLambda (2) • AWS Distro for OpenTelemetry Lambda (ADOT Lambda)

    • AWS͕ϝϯς͍ͯ͠Δopentelemetry-lambdaͷσΟετϦϏϡʔγϣϯ • AWS͕બΜͩίϯϙʔωϯτ͔ΒͳΔcollectorΛಈ͔͢ • ͜Εʹdatadogexporter͸ؚ·Ε͍ͯͳ͍ˠࣗલͰϏϧυ͢Δ΄͔ͳ͍
  5. Lambdaͱൿಗ৘ใ • Lambdaؔ਺ʹσϓϩΠෆཁͰ஋Λ౉͢ํ๏͸؀ڥม਺ͱAmazon EFSͷΈ • ؀ڥม਺͸ؔ਺ͷઃఆʹฏจͰهड़͢Δ • Amazon EFS͸ϚωʔδυNFSαʔϏε •

    → ͲͪΒ΋ൿಗ৘ใͷड͚౉͠ํ๏ͱͯ͠ෆద౰ • Parameters StoreͱSecrets Managerͱ͍͏αʔϏεʹอଘ͠ɺ
 otel-lambda͔ΒAPIΛ࢖ͬͯ͜ΕΒ͔Β஋Λऔಘ͢Ε͹Αͦ͞͏