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

Add region to SM backend URL #420

Merged
merged 6 commits into from
Apr 22, 2024
Merged

Add region to SM backend URL #420

merged 6 commits into from
Apr 22, 2024

Conversation

spinillos
Copy link
Member

Related: #388

It allows to set the region for Synthetic Monitoring.

@spinillos spinillos requested a review from a team as a code owner April 19, 2024 11:19
docs/content/configuration.md Outdated Show resolved Hide resolved
@@ -26,6 +26,7 @@ import (
*/

const smBaseURL = "https://synthetic-monitoring-api.grafana.net"
const smRegionURL = "https://synthetic-monitoring-api-%s.grafana.net"
Copy link
Member

@julienduchesne julienduchesne Apr 19, 2024

Choose a reason for hiding this comment

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

I would add the same exceptions as here: https://github.com/grafana/terraform-provider-grafana/blob/main/internal/resources/cloud/resource_synthetic_monitoring_installation.go#L16-L22

Otherwise, if someone creates a stack in eu, and tries to use Grizzly, it will fail. All new APIs (from new supported clusters) are being provisioned with the API URL you have here, so this will be fairly future-proof

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't see that!

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm seeing that the list here is larger than the one set in TF provider.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's probes, not API endpoints, right? A probe is the remote node that pings your host. They connect to an API for configuration. There will be far fewer API endpoints than probes.

Copy link
Member

Choose a reason for hiding this comment

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

Nope, these are the API endpoints for probes to connect to. We have lots of API endpoints (one per cluster)

Copy link
Member

@julienduchesne julienduchesne left a comment

Choose a reason for hiding this comment

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

LGTM, just two small comments

pkg/syntheticmonitoring/provider.go Outdated Show resolved Hide resolved
pkg/syntheticmonitoring/provider.go Show resolved Hide resolved
@spinillos spinillos merged commit f7c171e into main Apr 22, 2024
8 checks passed
@spinillos spinillos deleted the sm-add-region branch April 22, 2024 09:18
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.

3 participants