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 GrafanaCloudLogs as an logging enpoint #556

Merged
merged 3 commits into from
Oct 28, 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
65 changes: 65 additions & 0 deletions fastly/fixtures/grafanacloudlogs/create.yaml
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: ""
49 changes: 49 additions & 0 deletions fastly/fixtures/grafanacloudlogs/delete.yaml
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: ""
46 changes: 46 additions & 0 deletions fastly/fixtures/grafanacloudlogs/get.yaml
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: ""
45 changes: 45 additions & 0 deletions fastly/fixtures/grafanacloudlogs/list.yaml
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: ""
64 changes: 64 additions & 0 deletions fastly/fixtures/grafanacloudlogs/update.yaml
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: ""
51 changes: 51 additions & 0 deletions fastly/fixtures/grafanacloudlogs/version.yaml
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: ""
Loading
Loading