Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sentry/projectoptions/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
epoch_defaults={
1: {
"span_ops": {
"type": "span_operations",
"type": "spanOperations",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@untitaker I'm going to rename this to camel case for the project options.

"matches": ["http", "db", "browser", "resource"],
}
},
Expand Down
7 changes: 3 additions & 4 deletions src/sentry/relay/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,9 @@ def get_project_config(project, full_config=True, project_keys=None):
if dynamic_sampling is not None:
cfg["config"]["dynamicSampling"] = dynamic_sampling

if features.has("organizations:performance-ops-breakdown", project.organization):
breakdowns_config = project.get_option("sentry:breakdowns")
if breakdowns_config is not None:
cfg["config"]["breakdowns"] = breakdowns_config
breakdowns_config = project.get_option("sentry:breakdowns")
if breakdowns_config is not None:
cfg["config"]["breakdowns"] = breakdowns_config

if not full_config:
# This is all we need for external Relay processors
Expand Down
11 changes: 7 additions & 4 deletions tests/sentry/api/endpoints/test_relay_projectconfigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@


def _get_all_keys(config):
for key in config:
yield key
if isinstance(config[key], dict):
for key in _get_all_keys(config[key]):
for config_key in config:
yield config_key
if isinstance(config[config_key], dict):
for key in _get_all_keys(config[config_key]):
# Bypass operations breakdown key
if config_key == "breakdowns" and key == "span_ops":
continue
yield key


Expand Down
11 changes: 7 additions & 4 deletions tests/sentry/api/endpoints/test_relay_projectconfigs_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@


def _get_all_keys(config):
for key in config:
yield key
if isinstance(config[key], dict):
for key in _get_all_keys(config[key]):
for config_key in config:
yield config_key
if isinstance(config[config_key], dict):
for key in _get_all_keys(config[config_key]):
# Bypass operations breakdown key
if config_key == "breakdowns" and key == "span_ops":
continue
yield key


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
created: '2021-04-26T06:44:48.641788Z'
created: '2021-05-13T22:16:37.531016Z'
creator: sentry
source: tests/sentry/relay/test_config.py
---
Expand All @@ -13,7 +13,7 @@ config:
- db
- browser
- resource
type: span_operations
type: spanOperations
datascrubbingSettings:
excludeFields: []
scrubData: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
created: '2021-04-26T06:44:48.504933Z'
created: '2021-05-13T22:16:37.389823Z'
creator: sentry
source: tests/sentry/relay/test_config.py
---
Expand All @@ -13,7 +13,7 @@ config:
- db
- browser
- resource
type: span_operations
type: spanOperations
datascrubbingSettings:
excludeFields: []
scrubData: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
---
created: '2021-04-26T06:44:48.376070Z'
created: '2021-05-13T22:16:37.268371Z'
creator: sentry
source: tests/sentry/relay/test_config.py
---
config:
allowedDomains:
- '*'
breakdowns:
span_ops:
matches:
- http
- db
- browser
- resource
type: spanOperations
datascrubbingSettings:
excludeFields: []
scrubData: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
---
created: '2021-04-26T06:44:48.135605Z'
created: '2021-05-13T22:16:37.059214Z'
creator: sentry
source: tests/sentry/relay/test_config.py
---
config:
allowedDomains:
- '*'
breakdowns:
span_ops:
matches:
- http
- db
- browser
- resource
type: spanOperations
datascrubbingSettings:
excludeFields: []
scrubData: true
Expand Down