OTel: Sentry

Open
#183 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python

Research direction

Start by inspecting the current Sentry SDK initialization in flagsmith/flagsmith and compare it with api/integrations/sentry/samplers.py. Then trace the existing OpenTelemetry tracing setup and determine how the sampler and compatible settings fit there. Done means Sentry initialization uses OTLPIntegration and tracing, breadcrumbs, and error capture continue to work.

Written by the indexing model from the issue text.

Description

  1. Move over Sentry SDK initialisation from flagsmith/flagsmith to here.
  2. Port https://github.com/Flagsmith/flagsmith/blob/main/api/integrations/sentry/samplers.py to a opentelemetry.sdk.trace.sampling.Sampler subclass, and maintain compatibility with existing Sentry tracing settings DEFAULT_SENTRY_TRACE_SAMPLE_RATE, DASHBOARD_ENDPOINTS_SENTRY_TRACE_SAMPLE_RATE, FORCE_SENTRY_TRACE_KEY. Introduce non-sentry aliases for these settings (e.g. OTEL_FORCE_TRACE_KEY). Add the Sampler to OTel tracing setup.
  3. Initialise Sentry SDK with integrations=[OTLPIntegration()].
  4. Make sure Sentry tracing, breadcrumbs, and error capture work.
Dominant language
Python
Stars
2
Forks
4
Avg merge
2d 9h
Merged PRs (30d)
10

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Flagsmith/flagsmith-common

All issues in Flagsmith/flagsmith-common

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.