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

Bug 1685769 - Add cloud monitoring export script and jobs #1679

Closed
wants to merge 5 commits into from

Conversation

BenWu
Copy link
Contributor

@BenWu BenWu commented Jan 15, 2021

https://bugzilla.mozilla.org/show_bug.cgi?id=1685769

This is blocked by grpc size limit in the monitoring library (googleapis/python-monitoring#62). Some intervals for some metrics can't be exported with the current google-cloud-monitoring==2.0.0 and I don't think it's possible to pip install from git with pip-compile --generate-hashes.

@jklukas does this structure of a query.py in the project/dataset/table directory that uses a file in the bigquery-etl module fit into the bigquery-etl pattern?

@BenWu BenWu requested a review from jklukas January 15, 2021 17:51
@jklukas
Copy link
Contributor

jklukas commented Jan 15, 2021

@jklukas does this structure of a query.py in the project/dataset/table directory that uses a file in the bigquery-etl module fit into the bigquery-etl pattern?

Yes, that's an existing pattern and this looks like a reasonable approach.

@jklukas
Copy link
Contributor

jklukas commented Jan 15, 2021

I won't have time for a full review today, so I can take a look early next week. Otherwise, feel free to ask someone else for a full review.

@BenWu
Copy link
Contributor Author

BenWu commented Jan 15, 2021

Ok no rush on this since it's still blocked by the grpc issue and also permissions. Thanks

@BenWu BenWu changed the title Add cloud monitoring export script and jobs [Bug 1685769] Add cloud monitoring export script and jobs Jan 18, 2021
@BenWu BenWu changed the title [Bug 1685769] Add cloud monitoring export script and jobs Bug 1685769 - Add cloud monitoring export script and jobs Jan 18, 2021
@@ -331,3 +331,14 @@ bqetl_desktop_platform:
]
retries: 2
retry_delay: 30m

bqetl_cloud_monitoring_export:
schedule_interval: 0 * * * *
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this is equivalent to @daily, and we should prefer that shorthand if it's what we use consistently elsewhere in this repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is hourly but yes @hourly would work

Comment on lines +194 to +202
# get existing timestamps in destination table to avoid overlap
if not overwrite and len(time_series_data) > 0:
time_series_data = filter_existing_data(
time_series_data,
bq_client,
target_table,
start_time,
end_time,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

My inclination would be to create these monitoring tables with hourly partitioning, and then have these scripts atomically overwrite the target partition (specifying the destination table as mytable$2021011201, etc.), avoiding the need for filtering logic like this.

We could achieve some simplification by having all this machinery assume that it's operating on one whole hour at a time. I may well be missing some nuance, though, so definitely open to pushback.

@BenWu
Copy link
Contributor Author

BenWu commented Jan 19, 2021

Going to discuss this with SRE before continuing

@BenWu
Copy link
Contributor Author

BenWu commented Jan 29, 2021

Going with influxdb instead. See https://bugzilla.mozilla.org/show_bug.cgi?id=1619406

@BenWu BenWu closed this Jan 29, 2021
@BenWu BenWu deleted the benwu/monitoring_export branch March 19, 2021 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants