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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
- Process logs in all non-proxy Relays. ([#4973](https://github.com/getsentry/relay/pull/4973))
- Add support for pre-hashed signatures. ([#5012](https://github.com/getsentry/relay/pull/5012))
- Add producer_name tag, and more rdkafka stats. ([#5031](https://github.com/getsentry/relay/pull/5031))
- Change the default configuration to produce to `snuba-items`. ([#5055](https://github.com/getsentry/relay/pull/5055))

## 25.7.0

Expand Down
4 changes: 2 additions & 2 deletions relay-config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1223,8 +1223,8 @@ pub struct SpanProducers {
impl Default for SpanProducers {
fn default() -> Self {
Self {
produce_json: true,
produce_protobuf: false,
produce_json: false,
produce_protobuf: true,
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions tests/integration/fixtures/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ def inner(options=None):
f"relay-test-relayconfig-{uuid.uuid4()}"
)

if processing.get("span_producers") is None:
processing["span_producers"] = {
"produce_json": True,
"produce_protobuf": False,
}
Copy link

Choose a reason for hiding this comment

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

Bug: Test Configuration Mismatch Causes JSON Ignored

The span_producers configuration in the test fixture uses incorrect field names (use_json, use_protobuf). The corresponding Rust SpanProducers struct expects produce_json and produce_protobuf. This mismatch causes the test configuration to be ignored, leading tests to use the default protobuf span production instead of the intended JSON.

Fix in Cursor Fix in Web


Copy link

Choose a reason for hiding this comment

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

Bug: Mismatched Test and Production Defaults

Test fixtures set span_producers defaults (produce_json: true, produce_protobuf: false) opposite to production defaults (produce_json: false, produce_protobuf: true). This prevents tests from validating actual production behavior, potentially hiding bugs.

Fix in Cursor Fix in Web

return options

return inner
Expand Down
9 changes: 8 additions & 1 deletion tests/integration/test_spans.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@
from .consts import (
TRANSACTION_EXTRACT_MIN_SUPPORTED_VERSION,
)
from .test_metrics import TEST_CONFIG
from .test_store import make_transaction

TEST_CONFIG = {
"aggregator": {
"bucket_interval": 1,
"initial_delay": 0,
"shift_key": "none",
}
}


@pytest.mark.parametrize("performance_issues_spans", [False, True])
@pytest.mark.parametrize("discard_transaction", [False, True])
Expand Down
Loading