-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GrafanaCloudLogs as an logging enpoint (#556)
* Change Region to URL, added Index * Updated fixtures --------- Co-authored-by: Grant Stephens <[email protected]>
- Loading branch information
1 parent
95d6429
commit 8ce02a6
Showing
8 changed files
with
833 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: format=format&index=%7B%22env%22%3A+%22prod%22%7D&name=test-grafanacloudlogs&placement=waf_debug&token=abcd1234&url=https%3A%2F%2Ftest123.grafana.net&user=123456 | ||
form: | ||
format: | ||
- format | ||
index: | ||
- '{"env": "prod"}' | ||
name: | ||
- test-grafanacloudlogs | ||
placement: | ||
- waf_debug | ||
token: | ||
- abcd1234 | ||
url: | ||
- https://test123.grafana.net | ||
user: | ||
- "123456" | ||
headers: | ||
Content-Type: | ||
- application/x-www-form-urlencoded | ||
User-Agent: | ||
- FastlyGo/9.8.0 (+github.com/fastly/go-fastly; go1.23.2) | ||
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/138/logging/grafanacloudlogs | ||
method: POST | ||
response: | ||
body: '{"format":"format","index":"{\"env\": \"prod\"}","name":"test-grafanacloudlogs","placement":"waf_debug","token":"abcd1234","url":"https://test123.grafana.net","user":"123456","service_id":"7i6HN3TK9wS159v2gPAZ8A","version":"138","updated_at":"2024-10-24T19:43:58Z","deleted_at":null,"format_version":"2","created_at":"2024-10-24T19:43:58Z","response_condition":""}' | ||
headers: | ||
Accept-Ranges: | ||
- bytes | ||
Cache-Control: | ||
- no-store | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Thu, 24 Oct 2024 19:43:58 GMT | ||
Fastly-Ratelimit-Remaining: | ||
- "991" | ||
Fastly-Ratelimit-Reset: | ||
- "1729800000" | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- control-gateway | ||
Status: | ||
- 200 OK | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Accept-Encoding | ||
Via: | ||
- 1.1 varnish, 1.1 varnish | ||
X-Cache: | ||
- MISS, MISS | ||
X-Cache-Hits: | ||
- 0, 0 | ||
X-Served-By: | ||
- cache-chi-klot8100074-CHI, cache-bos4679-BOS | ||
X-Timer: | ||
- S1729799038.016898,VS0,VE338 | ||
status: 200 OK | ||
code: 200 | ||
duration: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: "" | ||
form: {} | ||
headers: | ||
User-Agent: | ||
- FastlyGo/9.8.0 (+github.com/fastly/go-fastly; go1.23.2) | ||
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/138/logging/grafanacloudlogs/new-test-grafanacloudlogs | ||
method: DELETE | ||
response: | ||
body: '{"status":"ok"}' | ||
headers: | ||
Accept-Ranges: | ||
- bytes | ||
Cache-Control: | ||
- no-store | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Thu, 24 Oct 2024 19:43:59 GMT | ||
Fastly-Ratelimit-Remaining: | ||
- "989" | ||
Fastly-Ratelimit-Reset: | ||
- "1729800000" | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- control-gateway | ||
Status: | ||
- 200 OK | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Accept-Encoding | ||
Via: | ||
- 1.1 varnish, 1.1 varnish | ||
X-Cache: | ||
- MISS, MISS | ||
X-Cache-Hits: | ||
- 0, 0 | ||
X-Served-By: | ||
- cache-chi-kigq8000154-CHI, cache-bos4679-BOS | ||
X-Timer: | ||
- S1729799039.017911,VS0,VE270 | ||
status: 200 OK | ||
code: 200 | ||
duration: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: "" | ||
form: {} | ||
headers: | ||
User-Agent: | ||
- FastlyGo/9.8.0 (+github.com/fastly/go-fastly; go1.23.2) | ||
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/138/logging/grafanacloudlogs/test-grafanacloudlogs | ||
method: GET | ||
response: | ||
body: '{"placement":"waf_debug","name":"test-grafanacloudlogs","response_condition":"","user":"123456","updated_at":"2024-10-24T19:43:58Z","format_version":"2","format":"format","token":"abcd1234","deleted_at":null,"created_at":"2024-10-24T19:43:58Z","url":"https://test123.grafana.net","index":"{\"env\": | ||
\"prod\"}","version":"138","service_id":"7i6HN3TK9wS159v2gPAZ8A"}' | ||
headers: | ||
Accept-Ranges: | ||
- bytes | ||
Cache-Control: | ||
- no-store | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Thu, 24 Oct 2024 19:43:58 GMT | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- control-gateway | ||
Status: | ||
- 200 OK | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Accept-Encoding | ||
Via: | ||
- 1.1 varnish, 1.1 varnish | ||
X-Cache: | ||
- MISS, MISS | ||
X-Cache-Hits: | ||
- 0, 0 | ||
X-Served-By: | ||
- cache-chi-kigq8000134-CHI, cache-bos4679-BOS | ||
X-Timer: | ||
- S1729799039.526983,VS0,VE107 | ||
status: 200 OK | ||
code: 200 | ||
duration: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: "" | ||
form: {} | ||
headers: | ||
User-Agent: | ||
- FastlyGo/9.8.0 (+github.com/fastly/go-fastly; go1.23.2) | ||
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/138/logging/grafanacloudlogs | ||
method: GET | ||
response: | ||
body: '[{"url":"https://test123.grafana.net","index":"{\"env\": \"prod\"}","format":"format","created_at":"2024-10-24T19:43:58Z","format_version":"2","response_condition":"","placement":"waf_debug","updated_at":"2024-10-24T19:43:58Z","service_id":"7i6HN3TK9wS159v2gPAZ8A","deleted_at":null,"name":"test-grafanacloudlogs","token":"abcd1234","version":"138","user":"123456"}]' | ||
headers: | ||
Accept-Ranges: | ||
- bytes | ||
Cache-Control: | ||
- no-store | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Thu, 24 Oct 2024 19:43:58 GMT | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- control-gateway | ||
Status: | ||
- 200 OK | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Accept-Encoding | ||
Via: | ||
- 1.1 varnish, 1.1 varnish | ||
X-Cache: | ||
- MISS, MISS | ||
X-Cache-Hits: | ||
- 0, 0 | ||
X-Served-By: | ||
- cache-chi-klot8100074-CHI, cache-bos4679-BOS | ||
X-Timer: | ||
- S1729799038.385714,VS0,VE115 | ||
status: 200 OK | ||
code: 200 | ||
duration: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: format_version=2&index=%7B%22env%22%3A+%22staging%22%7D&name=new-test-grafanacloudlogs&placement=waf_debug&token=abcd6789&url=https%3A%2F%2Ftest456.grafana.net | ||
form: | ||
format_version: | ||
- "2" | ||
index: | ||
- '{"env": "staging"}' | ||
name: | ||
- new-test-grafanacloudlogs | ||
placement: | ||
- waf_debug | ||
token: | ||
- abcd6789 | ||
url: | ||
- https://test456.grafana.net | ||
headers: | ||
Content-Type: | ||
- application/x-www-form-urlencoded | ||
User-Agent: | ||
- FastlyGo/9.8.0 (+github.com/fastly/go-fastly; go1.23.2) | ||
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/138/logging/grafanacloudlogs/test-grafanacloudlogs | ||
method: PUT | ||
response: | ||
body: '{"deleted_at":null,"token":"abcd6789","name":"new-test-grafanacloudlogs","version":"138","user":"123456","updated_at":"2024-10-24T19:43:58Z","service_id":"7i6HN3TK9wS159v2gPAZ8A","format":"format","created_at":"2024-10-24T19:43:58Z","format_version":"2","response_condition":"","placement":"waf_debug","url":"https://test456.grafana.net","index":"{\"env\": | ||
\"staging\"}"}' | ||
headers: | ||
Accept-Ranges: | ||
- bytes | ||
Cache-Control: | ||
- no-store | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Thu, 24 Oct 2024 19:43:58 GMT | ||
Fastly-Ratelimit-Remaining: | ||
- "990" | ||
Fastly-Ratelimit-Reset: | ||
- "1729800000" | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- control-gateway | ||
Status: | ||
- 200 OK | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Accept-Encoding | ||
Via: | ||
- 1.1 varnish, 1.1 varnish | ||
X-Cache: | ||
- MISS, MISS | ||
X-Cache-Hits: | ||
- 0, 0 | ||
X-Served-By: | ||
- cache-chi-kigq8000134-CHI, cache-bos4679-BOS | ||
X-Timer: | ||
- S1729799039.663242,VS0,VE328 | ||
status: 200 OK | ||
code: 200 | ||
duration: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: "" | ||
form: {} | ||
headers: | ||
Content-Type: | ||
- application/x-www-form-urlencoded | ||
User-Agent: | ||
- FastlyGo/9.8.0 (+github.com/fastly/go-fastly; go1.23.2) | ||
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version | ||
method: POST | ||
response: | ||
body: '{"service_id":"7i6HN3TK9wS159v2gPAZ8A","number":138}' | ||
headers: | ||
Accept-Ranges: | ||
- bytes | ||
Cache-Control: | ||
- no-store | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Thu, 24 Oct 2024 19:43:57 GMT | ||
Fastly-Ratelimit-Remaining: | ||
- "992" | ||
Fastly-Ratelimit-Reset: | ||
- "1729800000" | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- control-gateway | ||
Status: | ||
- 200 OK | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Accept-Encoding | ||
Via: | ||
- 1.1 varnish, 1.1 varnish | ||
X-Cache: | ||
- MISS, MISS | ||
X-Cache-Hits: | ||
- 0, 0 | ||
X-Served-By: | ||
- cache-chi-kigq8000137-CHI, cache-bos4679-BOS | ||
X-Timer: | ||
- S1729799038.708215,VS0,VE273 | ||
status: 200 OK | ||
code: 200 | ||
duration: "" |
Oops, something went wrong.