Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cirrus): Set glean max event buffer value #10070

Merged
merged 5 commits into from
Jan 22, 2024
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 .env.integration-tests
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ CIRRUS_CHANNEL=release
CIRRUS_FML_PATH=./feature_manifest/sample.yml
CIRRUS_SENTRY_DSN=
CIRRUS_ENV_NAME=test_instance_stage
CIRRUS_GLEAN_MAX_EVENTS_BUFFER=1
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ CIRRUS_FML_PATH=./feature_manifest/sample.yml
CIRRUS_SENTRY_DSN=
CIRRUS_INSTANCE_NAME=
CIRRUS_ENV_NAME=test_instance_stage
CIRRUS_GLEAN_MAX_EVENTS_BUFFER=20
yashikakhurana marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ CIRRUS_FML_PATH=./tests/feature_manifest/sample.fml.yaml
CIRRUS_SENTRY_DSN=
CIRRUS_INSTANCE_NAME=test_instance
CIRRUS_ENV_NAME=test_instance_stage
CIRRUS_GLEAN_MAX_EVENTS_BUFFER=1
2 changes: 2 additions & 0 deletions cirrus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ To set up the Cirrus environment, follow these steps:
CIRRUS_SENTRY_DSN=dsn_url
CIRRUS_INSTANCE_NAME=cirrus_pod_app_v1
CIRRUS_ENV_NAME=test_app_stage
CIRRUS_GLEAN_MAX_EVENTS_BUFFER=10

```

Expand All @@ -40,6 +41,7 @@ To set up the Cirrus environment, follow these steps:
- `CIRRUS_SENTRY_DSN`: Replace `dsn_url` with the appropriate DSN value.
- `CIRRUS_INSTANCE_NAME`: Replace with the instance name.
- `CIRRUS_ENV_NAME:` Replace with the concatenation of project and environment name
- `CIRRUS_GLEAN_MAX_EVENTS_BUFFER`: This value represents the max events buffer size for glean. You can set the value from range 1 to 500, by default Cirrus sets it to 10.

Adjust the values of these variables according to your specific configuration requirements.

Expand Down
5 changes: 4 additions & 1 deletion cirrus/server/cirrus/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
str, config("CIRRUS_INSTANCE_NAME", default="instance name not defined")
)
env_name = cast(str, config("CIRRUS_ENV_NAME", default="production"))
glean_max_events_buffer: int = int(
config("CIRRUS_GLEAN_MAX_EVENTS_BUFFER", default=10) # type: ignore
)


@dataclass
Expand All @@ -39,7 +42,7 @@ class MetricsConfiguration:
channel: str = channel
data_dir: str = "/var/glean"
log_level: Union[str, int] = logging.getLevelName("WARNING")
max_events_buffer: int = 500
max_events_buffer: int = glean_max_events_buffer
server_endpoint: Optional[str] = None
upload_enabled: bool = True
version: str = "1.0"
Expand Down