Skip to content

Commit

Permalink
Develop docs content (#10330)
Browse files Browse the repository at this point in the history
* fix(apidocs): update note about full path (#963)

* fix(apidocs): update note about full path

* Update src/docs/api/public.mdx

Co-authored-by: Seiji Chew <[email protected]>

* Update public.mdx

---------

Co-authored-by: Seiji Chew <[email protected]>

* Update ports.mdx (#967)

* refactor(dynamic-sampling): rename uniform bias (#966)

* Update location of sentry frontend (#935)

* ref: replace freight with gocd (#968)

* docs(api): Update api instructions (#969)

Update `Making an API Public` section with more recent `@extend_schema` example, new `OpenApiExample` that includes `request_only=True` addition, and warning to update all requests in one endpoint in the same PR if multiple requests in the endpoint previously used manual JSON build.

* fix: Update link to Dockerfile in index.mdx (#972)

* Mention default value for op can be usesd in SDKs as well (#975)

Co-authored-by: Michi Hoffmann <[email protected]>

* docs(api): Change to right serializer (#974)

* Document GraphQL client errors (#973)

Co-authored-by: Karl Heinz Struggl <[email protected]>

* Update link to cookie-sync on the chrome store. (#978)

* docs(sdk): Add insufficient_data reason for client discard (#981)

Mention new insufficient_data reason for client discard introduced in getsentry/snuba#4407.

* feat(crons): Add trace_id and config to check-in payload (#982)

Adds the optional monitor_config and contexts to the check-in payload

* feat(env): Add debug info for getsentry startup issue (#984)

* Fragments are URI only - Browser SDKs (#979)

* fix(trace-origin): Should rarely change (#988)

Clarify that origin should rarely change.

* RTL updates are done (#989)

* Trace Origin: Clarify integration part (#987)

* feat: Make SQL logging snippet better (#990)

- Handle multiple connections (as we have those now)
- Make all imports self contained so that the example is easier to
  copy/paste.

* fix(python): Add information about `getsentry/pypi` to docs on Python deps (#986)

* Update span-data-conventions.mdx (#970)

* updated ttid/ttfd docs for app start timestamp (#992)

* updated ttid/ttfd docs for app start timestamp and measurements

---------

Co-authored-by: Philipp Hofmann <[email protected]>

* Fix typo: Removed an extra 'the' in index.mdx file

* Update check-ins.mdx (#993)

* docs(issue-platform): Add docs for writing a detector (#964)

* docs(issue-platform): Add docs for writing a detector

This adds docs for writing a new detector for the issue platform. Content taken from https://www.notion.so/sentry/New-Issues-Vertical-Team-Guide-b4b57f027be949908cbcb8351c171306#78fae32e7bac457987d615235f5d4666

* small fix

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Dameli Ushbayeva <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Matt Quinn <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Matt Quinn <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Matt Quinn <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Matt Quinn <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Matt Quinn <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Matt Quinn <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

Co-authored-by: Matt Quinn <[email protected]>

* Update src/docs/issue-platform-detectors.mdx

* Update src/docs/issue-platform-detectors.mdx

* Update src/docs/issue-platform-detectors.mdx

* Update src/docs/issue-platform-detectors.mdx

* Update src/docs/issue-platform-detectors.mdx

* Update src/docs/issue-platform-detectors.mdx

* Update src/docs/issue-platform-detectors.mdx

* Update src/docs/issue-platform-detectors.mdx

* Update src/docs/issue-platform-detectors.mdx

* Update src/docs/issue-platform-detectors.mdx

* Update src/docs/issue-platform-detectors.mdx

* fix code blocks and remove unused screenshot

* add titles

---------

Co-authored-by: Dameli Ushbayeva <[email protected]>
Co-authored-by: Matt Quinn <[email protected]>

* Fix sentence in performance/opentelemetry (#996)

* docs(api): Add other example (#976)

Add in-line serializer example

* fix(frontend): Better code example and explanation for network request mutation section (#997)

* doc(env): More details for metrics dev env (#999)

* docs(api): Improve documentation instructions (#1002)

* Update issue-platform.mdx (#1004)

`released`

* Update issue-platform.mdx (#1005)

* GraphQL performance spec (#1001)

Co-authored-by: Alexander Dinauer <[email protected]>

* Mention request/response bodies for GraphQL should be guarded by a flag (#1003)

Co-authored-by: Manoel Aranda Neto <[email protected]>

* Add hard stop for 23.6.2 due to django upgrade (#1006)

* add hard stop for 23.6.2 due to django upgrade

* add note around skipping 23.7.0

* feat(docs): Add getting Started docs guide (#1009)

* Update span-operations.mdx (#861)

* devenv: remove Docker.app (#1011)

* Fix typo in testing.mdx (#1012)

* add a "kafka consumers in sentry" doc (#1014)

* Add new database span data (#1016)

* fix: add line breaks in self-hosted overview (#1015)

* Update github.mdx: Adopt permissions table to actual GitHub's wording and section naming (#1013)

* devenv: update createuser stuff (#1017)

* docs(api): Overhaul instructions with step-by-step guide (#1007)

* Add Discord integration docs (#1018)

* Add Discord integration docs

* Add info message about the url verification failing

* Make suggested changes

* Add whitespace to create_bot so image isn't so tall

* Except with a white background this time

* (dev-doc-detector-threshold-configs): Updated issue platform detector docs. (#1023)

* (dev-doc-detector-threshold-configs): Updated issue platform detector docs to include section highlighting detector threshold configurations.

* (dev-doc-detector-threshold-configs): Reverted change to package.json

* (dev-doc-detector-threshold-configs): Minor Fixes.

---------

Co-authored-by: Abdullah Khan <[email protected]>

* Added response context (#1028)

For normalizing where we store the HTTP response code in our events we invented the response context: getsentry/team-sdks#9

This PR adds documentation on how this response context should look like.

* docs(apis): Adding API basics (#1027)

* docs(apis): Adding API basics

* Apply suggestions from code review

apply suggested changes

Co-authored-by: Shana Matthews <[email protected]>

---------

Co-authored-by: Shana Matthews <[email protected]>

* fix: 1MB limit is after decompression (#1025)

* feat: Add Guidelines for SDK Setup Wizards (#1030)

Add an SDK Setup Wizards page to the SDK development documentation. 

The purpose of this page is to

- Formulate high-level requirements for setup wizards
- Provide instructions around implementing new wizards such as the expected flow, which wizards to base new work on, helper functions and a few UI guidelines.

* docs(api): Add notes on designing new APIs (#1032)

* docs(api): Add notes on designing new APIs

* adding django link

* addressing feedback

* docs(api): Update publishing docs (#1033)

* docs(api): Update publishing docs

* addressed feedback

* ref(discord): Add OAuth2 redirect URI (#1035)

* docs: Document how to setup hook tests that rely on useApiQuery (#1036)

* docs(dev-ui): Update paragraph about dev-ui, domains and cookies (#1037)

* docs(dev env): Add note about `.zshrc` to `make setup-pyenv` section (#1038)

The `pyenv_setup.sh` script which runs when you call `make setup-pyenv` in the `sentry` repo only considers the case for zsh wherein the user has their zsh config in `~/.zprofile`. For anyone who doesn't, the script therefore doesn't work. This adds a note to the `zsh` tab of the code snippet telling people to do that part of the setup manually in that case.

* chore(docs): Update instructions with body param info (#1039)

View updated instructions [here](https://develop-git-seiji-choreupdate-api-instructions-with-body-5c7898.sentry.dev/api/public/)

This PR updates instructions about how to use body params. It also clarifies how optional/nullable fields work in TypedDicts, and also cleans up some language to be more smooth.

* chore(docs): Clarify private fields on response schema (#1041)

* include unique name bug (#1044)

* update migration instructions w/ github action to generate sql (#1043)

* remove some obsolete sections from testing.mdx (#1045)

* Update transaction clustering docs (#1047)

* feat: Add example for adding a column to a large table (#1046)

* feat: Add example for adding a column to a large table

- Add example of deploying schema changes to large tables. We'd like to
  move away from having SRE run column add migrations and need to
  document the self-service flow.
- Revise TOC to contain more sections and less nesting.
- Apply suggestions from code review

Co-authored-by: Evan Purkhiser <[email protected]>

* Add more GraphQL span ops (#1049)

Add graphql.validate and graphql.parse as span operations.

* Update span-data-conventions.mdx (#1050)

* Update backend typing section (#1052)

* feat: Simpler column add migration guide (#1051)

We don't need to add columns with dangerous migrations anymore. All
column adds can be done as deploy time migrations.

* Add missing slash, to do like other examples (#980)

* Add missing slash, to do like other examples

* Update src/docs/integrations/slack/index.mdx

---------

Co-authored-by: Liza Mock <[email protected]>

* docs: Add note about adding celery arguments (#1055)

* ref(docs): correct decoded body size name in docs (#1059)

* chore(docs): Add model serializer ordering and nested + inline serializer info (#1053)

* update instructions

* add bit more

* spans: add thread label and id to span data conventions (#1056)

* spans: add thread label and id to span data conventions

* spans: reword thread label and id

* Add notes for smtp server removal (#1060)

Refs getsentry/sentry#58361

* Fix typo in kafka-consumer-groups command in self-hosted troubleshooting docs (#1048)

* docs: Add note to restart snuba after enabling relay (#1058)

* docs: Add note to restart snuba after enabling relay

After enabling Relay and Kafka, the snuba container configuration needs to be updated,
this only happens when re-creating the container.

* Add metric alert feature flag to discord doc (#1062)

* Link /event-payloads is dead, changing to /sdk/event-payloads (#1064)

* feat: Replace docker-compose with "docker compose" (#1061)

* release-bot can have "elevated bot" instead of admin (#1068)

* fix(docs): Move alert next to options it references (#1067)

* fix: Be more explicit about system.url-prefix requirements (#1071)

Refs getsentry/self-hosted#2521

* feat: Add DDM documentation

* backlink from internal metrics to ddm

* update sdk version

* recommend sdks

* enable metrics experiment

* feat: devenv (#1069)

* SDKs: Distributed Tracing  (#1074)

* Initial version of distributed tracing documentation.

* ref(mail): Add mail preview docs (#1072)

* ref(mail): Add mail preview docs

* apple stuff

* mention using icloud

* feat(features): Document trial plan tiers (#1075)

* Document trial plan properties
* Clarify plan flags

* ref(discord): Remove mentions of feature flags for Discord (#1077)

* Fix SQL command quotes (#1073)

* Update sending-metrics-sdk.mdx (#1078)

* docs(issue-platform): Update docs from issue platform support additions (#1079)

* docs(issue-platform): Update docs to reflect supported functionality

* docs(issue-platform): Update docs for issue platform updates

* Status change updates

* Update from feedback

* Update status change

* add space

* minor fixes

* Fix link

* Fix other link

* Update src/docs/issue-platform.mdx

Co-authored-by: Snigdha Sharma <[email protected]>

* Update issue-platform.mdx

---------

Co-authored-by: Snigdha Sharma <[email protected]>

* remove mention of staging in workflow docs (#1080)

the staging environment no longer exists

* Remove `user.segment` (#1082)

* Fixing referenced make command (#1083)

* docs(crons): Document check-in envelope size limit (#1086)

* Update HTTP Client Integration (#1084)

* Add timer to sending-metrics-sdk (#1089)

* Add timer to sending-metrics-sdk

Documenting missing capability/example to send timers

* Update sending-metrics-sdk.mdx

---------

Co-authored-by: Armin Ronacher <[email protected]>

* Cleaned up some outdated documentation (#1093)

---------

Co-authored-by: Ivana Kellyerova <[email protected]>

* fix: Update MS Teams installation instructions (#1094)

* ref(devserver): Recommend dev.getsentry.net for devserver (#1095)

* feat(https): Add HTTPS setup for devserver (#1096)

* doc(backup): Update relocation docs (#1097)

These docs now mention the newly introduced relocation scopes, as well
as the `sentry-admin.sh` tool.

* feat: Add frames to span data conventions (#1099)

Add total, slow and frozen frames to span data conventions.

* feat(ddm): Document ddm alerts and dashboards + sample rate

* fix: Update URL to pagerduty integration setup (#1100)

* Added metrics development docs (#1098)

* feat(ddm): Employee org opt-in

* fix: fix typo on issue platform (#1106)

* Add `backpressure` client report reason (#1107)

* feat(crons): Add issue thresholds to MonitorConfig (#1108)

* Fix typo (#1109)

* docs(crons): Add thresholds to config example (#1111)

* Rename DDM to Sentry Developer Metrics (#1112)

* Rename DDM to Sentry Developer Metrics

* Rename DDM to Metrics

* Add code span data attributes (#1113)

* feat: Rename delightful developer metrics to sentry developer metrics

* docs(stories): Add some initial docs for the /stories/ Component Library (#1110)

* docs(stories): Add some initial docs for the /stories/ Component Library

* updates from reviewers

* undo extra formatting change

* also write about stories ownership, and ideas for what to include

* docs(stories): Add a note about using storyBook() with hooks and HoC wrappers (#1115)

* docs(stories): Add a note about using storyBook() with hooks and HoC wrappers

* Update src/docs/frontend/component-library.mdx

Co-authored-by: Malachi Willey <[email protected]>

---------

Co-authored-by: Malachi Willey <[email protected]>

* ref: remove outdated instructions about uwsgi (#1119)

- we're not on python 2
- we're using pyuwsgi
- uwsgi no longer needs to match the compiled python

* js-tests: Update some docs related to JS tests (#1121)

* Port "Frontend PR Previews" doc from notion (#1120)

* Port "Frontend PR Previews" doc from notion

* Apply suggestions from code review

Co-authored-by: Michelle Zhang <[email protected]>

---------

Co-authored-by: Michelle Zhang <[email protected]>

* docs(ui-lib): Write a blurb about the <ThemeToggle> UI Component Library helper (#1122)

* docs(ui-lib): Write a blurb about the <ThemeToggle> UI Component Library helper

* use tsx highlighting instead of typescript

* Update metrics.mdx (#1123)

* Update fidelity-and-biases.mdx (#1085)

* docs(issue-platform): Clarify documentation for StatusChangeMessage payloads (#1128)

Update docs for StatusChangeMessage

* Add Android emulator localhost troubleshooting (#1129)

Explain how to solve Android emulator events not showing up in local
Sentry instance.

* Update backup/restore docs to allow parameterization for scripts (#1130)

* update backup/restore docs to allow parameterization for scripts

* change backup/restore options to lowercase

* Add new/missing context fields (#1131)

* Add new thresholds to monitor config payload (#1132)

* Indicate that user segment is deprecated (#1133)

* Revert "Add new thresholds to monitor config payload" (#1134)

* docs(csp): remove if condition for CSP middleware (#1137)

* remove prop types (#1138)

* fix: Fix feature flag local development file path (#1135)

* docs(self-hosted): revamp self hosted related documentation (#1117)

* Update feature flags and screenshot (#1143)

* Update ui.mdx

* Update sidebar screenshot

* Update ui.mdx

* nit(api): Change yarn start to yarn dev in instructions (#1147)

* docs(self-hosted): Document `PyMemcachedCache` breaking change (#1146)

* docs(backup): Describe encryption (#1145)

* docs(backup): Describe encryption

* sentry-admin.sh -> ./sentry-admin.sh

* docs(grouping): Fix a few typos in grouping docs (#1151)

* Update case naming (#1155)

We dont' use CamelCase, we use camelBacked. While camelBack is generally
synonymous with CamelCase, the first letter should be lowercase.

* Documentation of Hub&Scope refactoring (#1158)

We are currently refactoring our internal concepts of Hubs and Scopes. This page is the starting point of documenting this, making it easier for other SDK developers to implement this in their respective SDK.

* docs: resolve typo in Breaking Changes part of self-hosted docs (#1149)

According to the example config file, it should be `PyMemcacheCache` not `PyMemcachedCache`

* nit(api): fix small typos on API page (#1159)

* feat(contexts): Describe additional fields which can be set by SDKs in trace context (#1157)

Added new fields to trace context which could be set by SDKs and are typed out in Relay

* Add frames delay (#1153)

Add docs for the performance metric frames delay.

* Update github.mdx (#1142)

Text edit.

* Document envelope item size limits (#1164)

* feat: Document new multi craft config feature (#1166)

* docs(self-hosted): enabling preview features section (#1148)

* docs(self-hosted): enabling preview features section

* Update index.mdx

Co-authored-by: Hubert Deng <[email protected]>

---------

Co-authored-by: Hubert Deng <[email protected]>

* Removed obsolete warning (#1168)

* Update metrics.mdx (#1171)

* Update metrics tag key regex (#1172)

* Update metrics.mdx (#1174)

* Add pagination section for apis (#1173)

* add pagination section for apis

* Apply suggestions from code review

Co-authored-by: Liza Mock <[email protected]>

* add sentence about stnardization around self.paginate

---------

Co-authored-by: Liza Mock <[email protected]>

* Worked on the description of the hubs and scopes refactoring (#1177)

* chore(metrics): Clarify SDK implementation details (#1178)

* Clarify when normalization should be applied

* Clarify flush interval to be 5s

* Add section for before_emit_metric callback

* docs(environment): Add devservices script to setup (#1179)

* fix(ddm): Fix docs for metrics (#1181)

* Reference Frontend Development Instructions (#1165)

There are tips there about the local server that are usefule and best to direct right away

* Hubs and Scopes changes reasoning (#1182)

Working on explaining the WHY of doing the refactoring and coming up with a content structure that works.

---------

Co-authored-by: Anton Pirker <[email protected]>

* chore(metrics): Clarify metrics span seeking/creating mode (#1185)

* Clarify metrics span seeking/creating mode

* Clarify span op/description

* Improve wording

* Improve wording

* WIP hubs/scopes clarifications (#1184)

Trying to refine hubs/scopes merge docs.

* Update span-data-conventions.mdx (#1183)

* Update span-data-conventions.mdx

* Update span-data-conventions.mdx

* docs(self-hosted): csrf troubleshooting (#1191)

* chore: Expand DSN docs to cover subdomain semantics. (#1190)

Explain what the various subdomains are in a DSN and explain the
backwards compatibility for US accounts

* Update index.mdx (#1187)

* Update index.mdx

* Update sidebar.tsx

* Unified API Disclaimer (#1193)

With the work on hubs and scopes refactoring, this page needs a disclaimer even more than before https://develop.sentry.dev/sdk/hub_and_scope_refactoring/


---------

Co-authored-by: Anton Pirker <[email protected]>
Co-authored-by: Alexander Dinauer <[email protected]>

* Document POTEL learnings from Java research (#1189)

* document POTEL learnings from Java research

* wording changes etc.

* remove TODOs

* Apply suggestions from code review

Co-authored-by: Ivana Kellyerova <[email protected]>

---------

Co-authored-by: Ivana Kellyerova <[email protected]>

* Rectify import of Feature component (#1200)

* feat(feature): Describe permanent vs temporary features (#1201)

* chore(otel): Update links to semantic conventions for Otel #1196

* add disclaimer that full backups are not officially supported (#1195)

* Add view hierarchy to attachment types (#1199)

* feat: Add migration deployment documentation (#1203)

* Expand database migration docs to also cover migration deployment as it
is now tool based instead of process based.
* Give more context on when to use postdeploy migrations
* Fix image paths

* feat(sdk): Add name spaces for metrics rate limits (#1205)

Adds a new rate limit component to quota limits in the
`x-sentry-rate-limits` header that communicates the namespace(s) that a
metrics rate limit should apply to. The data category of limits that
have this component is always `metric_bucket`, in other quotas this
component will not be set.

SDKs are instructed not to send metrics for a certain namespace if a
rate limit for that same namespace is active. The default namespace for
metrics (used by DDM) is "custom".

---------

Co-authored-by: Luca Forstner <[email protected]>

* Add a mapping from old to new hub API (#1202)

* Add a mapping from old to new hub API

* Update hub_and_scope_refactoring.mdx

* Update hub_and_scope_refactoring.mdx

* Update hub_and_scope_refactoring.mdx

* missing parentheses

* trying some formatting

* more formatting

* Update hub_and_scope_refactoring.mdx

* Update hub_and_scope_refactoring.mdx

* Table reformat

* Update hub_and_scope_refactoring.mdx

* Polishing the table

* Use <code> instead of <pre>

* Missing ` -> <code>

* typo

* Update src/docs/sdk/hub_and_scope_refactoring.mdx

Co-authored-by: Daniel Szoke <[email protected]>

---------

Co-authored-by: Daniel Szoke <[email protected]>

* Update rate-limiting.mdx (#1212)

Co-authored-by: Jan Michael Auer <[email protected]>

* Meric Normalization (#1213)

* Update metrics.mdx (#1214)

* feat(metrics): Mobile aggregator memory footprint (#1209)

Add a recommendation for the memory footprint of the aggregator for
mobile SDKs.

* Correct attribute name for namespaces (#1217)

* fix links to data category (#1220)

* W3C traceparent (#1136)

Co-authored-by: Lukas Stracke <[email protected]>

* Metric Normalization note on w (#1219)

* fixed typo (#1216)

* fix(ddm): Remove discouraging of gauges (#1224)

* Add expected User-Agent format to SDK docs (#1222)

* adds user-agent format

* adds info about semicolon separator

* adds examples for basic user agent

* Update src/docs/sdk/overview.mdx

Co-authored-by: Joris Bayer <[email protected]>

---------

Co-authored-by: Joris Bayer <[email protected]>

* Add link to live workshop about migrating to SaaS (#1231)

* Add link to live workshop about migrating to SaaS

Add link to workshop until April 30th, then change to recorded video once date passes.

* Update src/docs/self-hosted/index.mdx

* Update src/docs/self-hosted/index.mdx

* Add docs for options based feature flags (#1233)

* Add docs for options based feature flags

Add docs for the new way to use options based feature flags

* fixes

* Clarify feature docs a little more (#1237)

* docs(frontend): Update "Using Hooks" docs to reflect the latest state of the repo (#1238)

* docs(frontend): Remove DefaultProps page (#1239)

* docs(frontend): Remove stale content from Frontend main docs page (#1240)

* chore(lockreason): Update Lock Reason docs (#1236)

* removes lockreason from sidebar & adds note

* adds link to Threads interface

* Cache Integration (#1223)

* Add SDK features to event payload (#1244)

Add a new field features to the sdk event payload, which is handy for
tracking the adoption of features.

* Clarify `cache.success` (#1246)

* feat: Add `app.app_arch` context (#1247)

* feat: Add `app.app_arch` context

* also fix typos

* feat(crons): Add owner to check-ins sdk docs (#1249)

* feat: add Linux distributions to the os context (#1227)

* feat: add Linux distributions to the os context

* Link to official docs and a list of distribution identifiers

Also mention the /etc/os-release keys and how they map to the ones in the distribution object.

* fix(handbook): add type decl section (#953)

* fix(handbook): add type decl section

* Update src/docs/frontend/index.mdx

Co-authored-by: Ryan Albrecht <[email protected]>

---------

Co-authored-by: Ryan Albrecht <[email protected]>

* docs(frontend): Add a page for Using Styled Components (#1242)

* docs(frontend): Add a page for Using Styled Components

* review comments

* Update src/docs/frontend/using-styled-components.mdx

Co-authored-by: Michelle Zhang <[email protected]>

* Update src/docs/frontend/using-styled-components.mdx

Co-authored-by: Michelle Zhang <[email protected]>

---------

Co-authored-by: Michelle Zhang <[email protected]>

* feat(sdk): Add backpressure page (#1225)

* feat: add NGINX as a reverse proxy example (#1257)

* docs(self-hosted): avoid version confusion by specifying that we assume the version (#1256)

* Update index.mdx grammar (#1228)

Minor grammar correction

* Add ttid/ttfd contribution flags to span data convention (#1250)

* Add ttid/ttfd contribution flags to span data convention

* Move ttid/ttfd to new ui namespace

* Update src/docs/sdk/performance/span-data-conventions.mdx

Co-authored-by: Philipp Hofmann <[email protected]>

---------

Co-authored-by: Philipp Hofmann <[email protected]>

* Queue Integration (#1248)

* Made empty pages for all performance modules. To be filled in separate PRs (#1259)

* chore(feature-flags): Remove references to flagr (#1260)

We generally prefer people to use options automator, so remove references to flagr. We can update this with instructions for flagpole once it is completed.

* feat(perf): Add documentation for Requests instrumentation (#1261)

* Update relevant span data conventions
* Add Requests module documentation

* feat: Add multiregion overview docs (#1266)

* Move these out of notion into an easier to find long-term home. More
   multiregion docs will be added as they are completed.
* Use better aside markup

---------

Co-authored-by: Matt Duncan <[email protected]>

* feat: Add silo mode local development server and migration docs (#1271)

- Add docs on how to run siloed servers locally
- Add docs on maintaining split silo databases

---------

Co-authored-by: Matt Duncan <[email protected]>

* feat: Add documentation for several control silo subsystems (#1272)

Add high-level functional docs for the api gateway, integration proxy,
and webhook forwarding systems of multi-region sentry.

* Update port list
* Use mermaid.live for diagrams.
* Fix image link

---------

Co-authored-by: Matt Duncan <[email protected]>

* docs(self-hosted): recommend users to rerun install.sh for restart (#1255)

* docs(self-hosted): recommend users to rerun install.sh for restart

* docs(self-hosted): use stronger words for install.sh

* ref(sdk): Update examples with canonical name for logentry (#1275)

* feat: Add docs for cross-region RPC (#1273)

* feat: Add docs for cross-region RPC
* Apply suggestions from code review

---------

Co-authored-by: Matt Duncan <[email protected]>

* feat(hybrid-cloud): Adds Outbox documentation (#1274)

* feat(hybridcloud) Add documentation for testing helpers (#1276)

Add docs on multi-region testing helpers

* feat(hybridcloud) Expand architecture docs (#1277)

Include multi-region architecture diagram and context on how other
diagrams fit together.

* docs(trace-view): Updating docs referencing the trace view. (#1270)

* docs(trace-view): Updating docs referencing the trace view.

* Update src/docs/sdk/research/performance/index.mdx

Co-authored-by: Liza Mock <[email protected]>

---------

Co-authored-by: Abdullah Khan <[email protected]>
Co-authored-by: Liza Mock <[email protected]>

* feat: Add docs for foreign keys, tombstones and replicated models (#1280)

* Add missing slash in caddy path_regexp (#1279)

* Add queries module documentation (#1282)

* Adds some dev docs around webvital transaction and span conventions (#1281)

* Performance Modules are now called Insights Modules (#1287)

* feat(llm-monitoring): Docs for LLM monitoring (#1285)

* Docs for LLM monitoring

* Add notes field to table

* feat(frontend): Publish 'Design Tenets' doc (#1258)

* WIP - design tenets port from notion

* Add one image, drop the rest

* Update src/docs/frontend/design-tenets.mdx

* feat(metrics): Add maximum length for metric components (#1286)

* docs(screenloads): Document span conditions for screen loads metrics (#1284)

Documents the conditions for collecting span metrics to satisfy the screen loads module.

The screen loads module filters for specifically ui.load transactions and will surface data from the following spans.

* test(ui): Add examples of overriding default contexts (#1288)

* Update caches.mdx (#1289)

* Fix typo (#1265)

propogate -> propagate

* Update ui.mdx

* Made "dynamic sampling page" more readable (#1290)

* Made more easy to read
* Updated outdataed information

* docs(queues): Clarify where to set span data (#1294)

* Strengthen the docs (#1291)

- explain required vs. optional parameters
- clean up structure
- add more detail to example

* docs(app-starts): Add SDK requirements (#1293)

* debug (#1296)

* feat(flagpole): Adds core flagpole documentation (#1297)

Co-authored-by: Mark Story <[email protected]>

* Added missing categories (#1302)

Added three missing categories, sorted the list of categories and formatted the doc.

* feat(docs): Clarify rate limiting and trace completeness (#1301)

* fix(caches): Update JS redisInstrumentation snippet (#1303)

* fix(github): troubleshooting guide for invalid application name (#1268)

* fix(caches): Update JS redisInstrumentation snippet (2) (#1304)

---------

Co-authored-by: Josh Ferge <[email protected]>
Co-authored-by: Seiji Chew <[email protected]>
Co-authored-by: Markus Unterwaditzer <[email protected]>
Co-authored-by: Ogi <[email protected]>
Co-authored-by: Spencer Murray <[email protected]>
Co-authored-by: Joshua Li <[email protected]>
Co-authored-by: Kamil Ogórek <[email protected]>
Co-authored-by: Alexander Dinauer <[email protected]>
Co-authored-by: Michi Hoffmann <[email protected]>
Co-authored-by: Manoel Aranda Neto <[email protected]>
Co-authored-by: Karl Heinz Struggl <[email protected]>
Co-authored-by: Ryan Albrecht <[email protected]>
Co-authored-by: Tony Xiao <[email protected]>
Co-authored-by: Richard Ortenberg <[email protected]>
Co-authored-by: Danny Lee <[email protected]>
Co-authored-by: Philipp Hofmann <[email protected]>
Co-authored-by: Mark Story <[email protected]>
Co-authored-by: Katie Byers <[email protected]>
Co-authored-by: Dhiogo Brustolin <[email protected]>
Co-authored-by: Stefano <[email protected]>
Co-authored-by: Sanjay Prashadh <[email protected]>
Co-authored-by: Anton Ovchinnikov <[email protected]>
Co-authored-by: Dan Fuller <[email protected]>
Co-authored-by: Dameli Ushbayeva <[email protected]>
Co-authored-by: Matt Quinn <[email protected]>
Co-authored-by: Ivana Kellyerova <[email protected]>
Co-authored-by: Malachi Willey <[email protected]>
Co-authored-by: Joris Bayer <[email protected]>
Co-authored-by: Hubert Deng <[email protected]>
Co-authored-by: Priscila Oliveira <[email protected]>
Co-authored-by: Michelle Zhang <[email protected]>
Co-authored-by: Abhijeet Prasad <[email protected]>
Co-authored-by: Rafael Oliveira <[email protected]>
Co-authored-by: Josef Glatz <[email protected]>
Co-authored-by: Abdkhan14 <[email protected]>
Co-authored-by: Abdullah Khan <[email protected]>
Co-authored-by: Anton Pirker <[email protected]>
Co-authored-by: Athena Moghaddam <[email protected]>
Co-authored-by: Shana Matthews <[email protected]>
Co-authored-by: Jim Redmond <[email protected]>
Co-authored-by: Lukas Stracke <[email protected]>
Co-authored-by: Colleen O'Rourke <[email protected]>
Co-authored-by: anthony sottile <[email protected]>
Co-authored-by: Evan Purkhiser <[email protected]>
Co-authored-by: Dominik Buszowiecki <[email protected]>
Co-authored-by: Armen Zambrano G <[email protected]>
Co-authored-by: William Desportes <[email protected]>
Co-authored-by: Liza Mock <[email protected]>
Co-authored-by: Scott Cooper <[email protected]>
Co-authored-by: Jonas <[email protected]>
Co-authored-by: bonyuta0204 <[email protected]>
Co-authored-by: David Herberth <[email protected]>
Co-authored-by: Julia Hoge <[email protected]>
Co-authored-by: Bartek Ogryczak <[email protected]>
Co-authored-by: GeekCorner <[email protected]>
Co-authored-by: Matt Duncan <[email protected]>
Co-authored-by: Matej Minar <[email protected]>
Co-authored-by: George Gritsouk <[email protected]>
Co-authored-by: Armin Ronacher <[email protected]>
Co-authored-by: Snigdha Sharma <[email protected]>
Co-authored-by: Ian Woodard <[email protected]>
Co-authored-by: Alexandra Cota <[email protected]>
Co-authored-by: Alberto Leal <[email protected]>
Co-authored-by: Alex Zaslavsky <[email protected]>
Co-authored-by: Stephen Cefali <[email protected]>
Co-authored-by: Case Delst <[email protected]>
Co-authored-by: Tor <[email protected]>
Co-authored-by: Snigdha Sharma <[email protected]>
Co-authored-by: Roman Zavarnitsyn <[email protected]>
Co-authored-by: Alexander Tarasov <[email protected]>
Co-authored-by: Jenn Mueng <[email protected]>
Co-authored-by: Reinaldy Rafli <[email protected]>
Co-authored-by: Pieter Willekens <[email protected]>
Co-authored-by: Isabella Enriquez <[email protected]>
Co-authored-by: Oleksandr <[email protected]>
Co-authored-by: Meghna <[email protected]>
Co-authored-by: Hubert Deng <[email protected]>
Co-authored-by: Markus Hintersteiner <[email protected]>
Co-authored-by: Yash Kamothi <[email protected]>
Co-authored-by: Sigrid Huemer <[email protected]>
Co-authored-by: Riccardo Busetti <[email protected]>
Co-authored-by: Steven Eubank <[email protected]>
Co-authored-by: colin-sentry <[email protected]>
Co-authored-by: Reinaldy Rafli <[email protected]>
Co-authored-by: Leander Rodrigues <[email protected]>
Co-authored-by: Kryštof Woldřich <[email protected]>
Co-authored-by: Jan Michael Auer <[email protected]>
Co-authored-by: Luca Forstner <[email protected]>
Co-authored-by: Daniel Szoke <[email protected]>
Co-authored-by: markiemm <[email protected]>
Co-authored-by: Tim Fish <[email protected]>
Co-authored-by: Mischan Toosarani-Hausberger <[email protected]>
Co-authored-by: Neel Shah <[email protected]>
Co-authored-by: geoffg-sentry <[email protected]>
Co-authored-by: Gabe Villalobos <[email protected]>
Co-authored-by: Lukas Bableck <[email protected]>
Co-authored-by: edwardgou-sentry <[email protected]>
Co-authored-by: Nar Saynorath <[email protected]>
Co-authored-by: andrii-st <[email protected]>
Co-authored-by: Daniel Szoke <[email protected]>
Co-authored-by: Richard Roggenkemper <[email protected]>
  • Loading branch information
Show file tree
Hide file tree
Showing 245 changed files with 24,403 additions and 0 deletions.
127 changes: 127 additions & 0 deletions develop-docs/ab-testing/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# A/B Tests with Amplitude

## Why AB testing?

1. It's a direct, easy-to-understand way to validate your hypothesis or product change
2. Even when you know your change is an improvement, it allows you to quantify the impact

[Learn more](https://www.optimizely.com/optimization-glossary/ab-testing/)

## Example

- Adding a "signup with github” button to the sign up page
- Hypothesis: signup rate will increase because there's an easier way to sign up

We showed half the visitors the new signup page, and the other half the old page. Turns out there was no effect on the signup rate, i.e. people do use GitHub to sign up, but if it isn't available they will use the regular form instead.

## Details

Our A/B testing framework is built on [Facebook's planout library](https://github.com/facebookarchive/planout).

Let's say you want to optimize the clickthrough rate for Sentry links and decide to test whether to show Plugins in the Integration Directory.

For any experiment, there are 2 events of interest:

- Exposure: when the user is subjected to the experiment. In this case it is when a link is shown.
- Action: the behavior we're trying to observe, which should always be tied to a metric. In this case the action is a click and the metric is the clickthrough rate.

## Adding an A/B Test

To launch the A/B test you will need to do the following:

1. Set up an A/B test in Getsentry to place users/organizations into different test groups.
2. Adding the experiment to the list of experiments in Sentry for Typescript definitions
3. Add the logic where you have to control the in-app behavior

### Changes to `getsentry/getsentry`

In **getsentry/getsentry**, locate the `getsentry/experiments/config.py` file. In this file, you will define an experiment class that inherits from either `OrgExperiment` or `UserExperiment`. Choose one depending on whether you want to assign the experiment across each user or each organization.

For this example, we will use the `OrgExperiment` , this way everyone in the organization will be given the same experiment assignment.

```python
# In getsentry/experiments/config.py

from __future__ import absolute_import

from django.conf import settings

from .base import OrgExperiment
from planout.ops.random import WeightedChoice

WEIGHT_VARIANT = 0.5

class ShowPluginsExperiment(OrgExperiment):
def default_value(self):
return "0"

def assign(self, params, org, actor):
if settings.IS_TEST or org.slug == "sentry":
params.variant = "1"
else:
params.variant = WeightedChoice(
choices=["0", "1"], weights=[1 - WEIGHT_VARIANT, WEIGHT_VARIANT], unit=org.id
)
```


- You can set the assignment value to whatever is necessary for your experiment.
- Assignment logic: The `assign` function on the experiment class determines which group an entity falls into. In the most simple case, you have just two groups: a control and test group. If that's the case, you can use `BernoulliTrial` to generate the test value. If you have three or more groups, you can use `UniformChoice`. You can also insert whatever custom logic you want, such as enabling an experiment if a particular feature flag is set.
- You can use other random assignment operators.

We are setting the values to "0" or "1" and giving a 50% chance an organization sees the plugins in the Integration Directory

Initialize the experiment in `getsentry/web/apps.py` :

If you add your experiment to `getsentry/experiments/config.py` ACTIVE_EXPERIMENTS then it will be automatically initialized because of this piece of code. So no need to make any edits.
```python
class Config(AppConfig):
for experiment in ACTIVE_EXPERIMENTS:
expt_manager.add(experiment, experiment.param_name)
```

### Changes to **`getsentry/sentry`**

In `static/app/data/experimentConfig.tsx` :

```tsx
export const experimentList = [
{
key: 'ShowPluginsExperiment',
type: ExperimentType.Organization,
parameter: 'exposed',
assignments: [0, 1],
},
] as const;
```

Now the experiment is available to you in the `organization` props. You can access it with:

`organization?.experiments?.ShowPluginsExperiment`.

Now you can build conditional logic to show whichever view you want, depending on if they are part of the experiment or the control group.

### Adding Logic

To use the experiment to drive in-app logic on the front-end you should use the `withExperiment` HoC. Here's an [example](https://github.com/getsentry/sentry/blob/76acba78e8bbd730873bb46e04f7930bb748d371/src/sentry/static/sentry/app/views/organizationIntegrations/integrationListDirectory.tsx#L491-L495) of it. It will add a prop called `experimentAssignment` which you can use to determine which experience to show.

### Logging the Experiment

In order to measure the result of the experiment, we need to log the experiment. This generates a `Triggered Experiment (Deduped)` event in Amplitude which you can use as the first step in your funnel (example [here](https://analytics.amplitude.com/sentry/chart/u5gt3z8)). If you use `withExperiment`, it will log the experiment automatically when the component mounts. If you want to only log the experiment under certain conditions (ex: org shouldn't qualify for the experiment). If you set `injectLogExperiment` to `true`, the child of the HoC is responsible for calling `logExperiment`.

### Backend A/B Testing

It is possible to run backend-only A/B testing where the experiment values have to be read in a different way than the FE. To do this, you need to do the following:

```python
from sentry.experiments import manager as expt_manager

# gets the value of assigned for ExampleMultiChoiceExperiment
exposed = expt_manager.get("ExampleMultiChoiceExperiment", org=org, actor=user)
```

You can then add checks on the value of `exposed` to drive your in-app logic.

### Logging the Experiment on the Backend

Logging the experiment on the backend can be tricky because it creates an analytics event each time it's triggered. That might be too many events depending on how often it's called. Refer to the implementation of the [log experiment endpoint](https://github.com/getsentry/getsentry/blob/master/getsentry/web/experiment.py) to see how to log the experiment on the backend.
Loading

0 comments on commit b6c8dfb

Please sign in to comment.