Skip to content

Commit

Permalink
Add support for the New Relic OTLP logging endpoint (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
kellymclaughlin authored Aug 2, 2023
1 parent a766f37 commit 8c10d4b
Show file tree
Hide file tree
Showing 8 changed files with 795 additions and 0 deletions.
57 changes: 57 additions & 0 deletions fastly/fixtures/newrelicotlp/create.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
version: 1
interactions:
- request:
body: format=format&name=test-newrelicotlp&placement=waf_debug&token=abcd1234&url=https%3A%2F%2Fexample.nr-data.net
form:
format:
- format
name:
- test-newrelicotlp
placement:
- waf_debug
token:
- abcd1234
url:
- https://example.nr-data.net
headers:
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- FastlyGo/8.5.7 (+github.com/fastly/go-fastly; go1.20.6)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/162/logging/newrelicotlp
method: POST
response:
body: '{"format":"format","name":"test-newrelicotlp","placement":"waf_debug","token":"abcd1234","url":"https://example.nr-data.net","service_id":"7i6HN3TK9wS159v2gPAZ8A","version":"162","response_condition":"","format_version":"2","deleted_at":null,"updated_at":"2023-07-27T16:58:48Z","created_at":"2023-07-27T16:58:48Z","region":null}'
headers:
Accept-Ranges:
- bytes
Cache-Control:
- no-store
Content-Type:
- application/json
Date:
- Thu, 27 Jul 2023 16:58:48 GMT
Fastly-Ratelimit-Remaining:
- "990"
Fastly-Ratelimit-Reset:
- "1690477200"
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-control-cp-aws-us-east-2-prod-5-CONTROL-AWS-UE2, cache-den8266-DEN
X-Timer:
- S1690477128.923265,VS0,VE374
status: 200 OK
code: 200
duration: ""
45 changes: 45 additions & 0 deletions fastly/fixtures/newrelicotlp/delete.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/8.5.7 (+github.com/fastly/go-fastly; go1.20.6)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/162/logging/newrelicotlp/new-test-newrelicotlp
method: DELETE
response:
body: '{"status":"ok"}'
headers:
Accept-Ranges:
- bytes
Cache-Control:
- no-store
Content-Type:
- application/json
Date:
- Thu, 27 Jul 2023 16:58:49 GMT
Fastly-Ratelimit-Remaining:
- "988"
Fastly-Ratelimit-Reset:
- "1690477200"
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-control-cp-aws-us-east-2-prod-5-CONTROL-AWS-UE2, cache-den8266-DEN
X-Timer:
- S1690477129.307163,VS0,VE273
status: 200 OK
code: 200
duration: ""
41 changes: 41 additions & 0 deletions fastly/fixtures/newrelicotlp/get.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
version: 1
interactions:
- request:
body: ""
form: {}
headers:
User-Agent:
- FastlyGo/8.5.7 (+github.com/fastly/go-fastly; go1.20.6)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/162/logging/newrelicotlp/test-newrelicotlp
method: GET
response:
body: '{"region":null,"token":"abcd1234","response_condition":"","deleted_at":null,"placement":"waf_debug","updated_at":"2023-07-27T16:58:48Z","name":"test-newrelicotlp","url":"https://example.nr-data.net","service_id":"7i6HN3TK9wS159v2gPAZ8A","version":"162","created_at":"2023-07-27T16:58:48Z","format":"format","format_version":"2"}'
headers:
Accept-Ranges:
- bytes
Cache-Control:
- no-store
Content-Type:
- application/json
Date:
- Thu, 27 Jul 2023 16:58:48 GMT
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-control-cp-aws-us-east-2-prod-7-CONTROL-AWS-UE2, cache-den8266-DEN
X-Timer:
- S1690477129.547310,VS0,VE145
status: 200 OK
code: 200
duration: ""
41 changes: 41 additions & 0 deletions fastly/fixtures/newrelicotlp/list.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
version: 1
interactions:
- request:
body: ""
form: {}
headers:
User-Agent:
- FastlyGo/8.5.7 (+github.com/fastly/go-fastly; go1.20.6)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/162/logging/newrelicotlp
method: GET
response:
body: '[{"format_version":"2","url":"https://example.nr-data.net","name":"test-newrelicotlp","region":null,"deleted_at":null,"placement":"waf_debug","format":"format","version":"162","service_id":"7i6HN3TK9wS159v2gPAZ8A","created_at":"2023-07-27T16:58:48Z","updated_at":"2023-07-27T16:58:48Z","response_condition":"","token":"abcd1234"}]'
headers:
Accept-Ranges:
- bytes
Cache-Control:
- no-store
Content-Type:
- application/json
Date:
- Thu, 27 Jul 2023 16:58:48 GMT
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-control-cp-aws-us-east-2-prod-4-CONTROL-AWS-UE2, cache-den8266-DEN
X-Timer:
- S1690477128.339379,VS0,VE159
status: 200 OK
code: 200
duration: ""
51 changes: 51 additions & 0 deletions fastly/fixtures/newrelicotlp/update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
version: 1
interactions:
- request:
body: format_version=2&name=new-test-newrelicotlp
form:
format_version:
- "2"
name:
- new-test-newrelicotlp
headers:
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- FastlyGo/8.5.7 (+github.com/fastly/go-fastly; go1.20.6)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/162/logging/newrelicotlp/test-newrelicotlp
method: PUT
response:
body: '{"token":"abcd1234","region":null,"format":"format","format_version":"2","version":"162","created_at":"2023-07-27T16:58:48Z","service_id":"7i6HN3TK9wS159v2gPAZ8A","name":"new-test-newrelicotlp","url":"https://example.nr-data.net","placement":"waf_debug","updated_at":"2023-07-27T16:58:48Z","deleted_at":null,"response_condition":""}'
headers:
Accept-Ranges:
- bytes
Cache-Control:
- no-store
Content-Type:
- application/json
Date:
- Thu, 27 Jul 2023 16:58:49 GMT
Fastly-Ratelimit-Remaining:
- "989"
Fastly-Ratelimit-Reset:
- "1690477200"
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-control-cp-aws-us-east-2-prod-5-CONTROL-AWS-UE2, cache-den8266-DEN
X-Timer:
- S1690477129.747482,VS0,VE490
status: 200 OK
code: 200
duration: ""
47 changes: 47 additions & 0 deletions fastly/fixtures/newrelicotlp/version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
version: 1
interactions:
- request:
body: ""
form: {}
headers:
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- FastlyGo/8.5.7 (+github.com/fastly/go-fastly; go1.20.6)
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version
method: POST
response:
body: '{"service_id":"7i6HN3TK9wS159v2gPAZ8A","number":162}'
headers:
Accept-Ranges:
- bytes
Cache-Control:
- no-store
Content-Type:
- application/json
Date:
- Thu, 27 Jul 2023 16:58:47 GMT
Fastly-Ratelimit-Remaining:
- "991"
Fastly-Ratelimit-Reset:
- "1690477200"
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-control-cp-aws-us-east-2-prod-5-CONTROL-AWS-UE2, cache-den8266-DEN
X-Timer:
- S1690477128.601781,VS0,VE299
status: 200 OK
code: 200
duration: ""
Loading

0 comments on commit 8c10d4b

Please sign in to comment.