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: Add Frontend Observability provider #2001

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kpelelis
Copy link

This commit adds the groundwork to support Frontend Observability as code. More specificailly, the change contains

  1. A Go HTTP client that consumes the Apps API (Create/Read/Update/Delete)
  2. Data Source and Resource version of the Frontend Observability App entity.

@kpelelis kpelelis requested a review from a team as a code owner January 24, 2025 17:37
@kpelelis kpelelis marked this pull request as draft January 24, 2025 17:37
Copy link

In order to lower resource usage and have a faster runtime, PRs will not run Cloud tests automatically.
To do so, a Grafana Labs employee must trigger the cloud acceptance tests workflow manually.

@kpelelis kpelelis force-pushed the feat-frontend-o11y-as-code branch 3 times, most recently from 88fb19a to a0a29c0 Compare January 24, 2025 17:46
@Alex3k
Copy link

Alex3k commented Feb 6, 2025

Hey @kpelelis this is awesome thank you! I have been after this for about a year :)

I noticed the thing about getting the frontend o11y API URL. Would it be possible to update the grafana cloud provider to return this instead? Otherwise the frontend o11y terraform provider can’t be used when creating a grafana cloud stack within the same terraform, it can only be used in situations with an existing stack which isn’t ideal for the whole everything as code paradigm

@kpelelis kpelelis force-pushed the feat-frontend-o11y-as-code branch 2 times, most recently from 6f656ea to 752b3db Compare February 11, 2025 14:59
@kpelelis
Copy link
Author

Hey @Alex3k thank you so much for your feedback. I updated the terraform API that it uses as minimal data as possible. Check the examples and how to set the feature up

@kpelelis kpelelis force-pushed the feat-frontend-o11y-as-code branch from 752b3db to f25a604 Compare February 11, 2025 15:02
name = "gcloudstacktest"
}

resource "grafana_frontend_o11y_app" "test-app" {
Copy link

Choose a reason for hiding this comment

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

Is it possible to set Combine K6 with RUM data in this resource also for each frontend o11y app?

Copy link
Author

Choose a reason for hiding this comment

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

Yes! Its possible from the settings using the "combineLabData" setting

"terraform" : "true"
}

settings = {
Copy link

Choose a reason for hiding this comment

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

I couldn't see any docs on what the possible settings are for this block - is that something we plan to add? or maybe a link to some other docs that indicate what options are available?

Copy link
Author

Choose a reason for hiding this comment

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

I added documentation on the settings that we currently have available (More to be released soon ;) )

@Alex3k
Copy link

Alex3k commented Feb 11, 2025

Hey @Alex3k thank you so much for your feedback. I updated the terraform API that it uses as minimal data as possible. Check the examples and how to set the feature up

This is awesome! I like that you can use cloud_access_policy_token as an alternative to frontend_o11y_api_access_token but can still use two separate tokens if you like. Very helpful.

I added a few comments around the settings block of the grafana_frontend_o11y_app resource.

I'd love to give this a run through and see how our current automation fits into this. When it's ready can you let me know so I can have a play?

@kpelelis kpelelis force-pushed the feat-frontend-o11y-as-code branch 6 times, most recently from fb1a95b to 9c4fdad Compare February 12, 2025 17:45
@kpelelis kpelelis marked this pull request as ready for review February 12, 2025 17:46
This commit adds the groundwork to support Frontend Observability as
code. More specificailly, the change contains

1. A Go HTTP client that consumes the Apps API (Create/Read/Update/Delete)
2. Data Source and Resource version of the Frontend Observability App
   entity.
@kpelelis kpelelis force-pushed the feat-frontend-o11y-as-code branch from 9c4fdad to 0e86793 Compare February 17, 2025 11:10
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.

2 participants