Comments (5)
Can you please provide more complete debug logs of version 7?
from fastly-exporter.
@phamann Do you have an example of a multi-page response set that we could test against?
from fastly-exporter.
Thanks for quick reply, there's nothing really useful in logs just the same lines:
level=info filter=services type="name allowlist" expr=.*p22655.*
level=debug component=api.fastly.com service_id=XXXXXX service_name="XXXXXXXX" service_version=1 result=rejected reason="service name rejected by name filter"
then:
level=debug component=api.fastly.com refresh_took=731.848444ms total_service_count=106 accepted_service_count=0
level=info component=server listen=0.0.0.0:8080
i'm using allowlist so it doesn't subscribe, if i'm removing allowlist it proceed with the ones found (the 106 instead of 7,5K):
level=info component=api.fastly.com service=found service_id=XXX name=XXXX version=1
level=info component=rt.fastly.com service_id=XXXXX subscriber=create
from fastly-exporter.
Thanks for reporting this @AWKIF and sorry you're having issues with this recent change.
@peterbourgon here's a multi-page response, the main thing to note is the Link
header value and structure.
Request:
curl -sv -X GET 'https://api.fastly.com/service?page=1&per_page=1' -H "Fastly-Key: <redacted>"
Response:
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 25953
Status: 200 OK
Content-Type: application/json
Cache-Control: no-store
Link: <https://api.fastly.com/service?page=3&per_page=1>; rel="last", <https://api.fastly.com/service?page=2&per_page=1>; rel="next"
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Date: Fri, 04 Mar 2022 12:14:16 GMT
Age: 55
X-Served-By: cache-lcy19267-LCY
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1646396057.822165,VS0,VE1
Vary: Accept-Encoding
Strict-Transport-Security: max-age=31536000
[
{
"name": "My test service",
"deleted_at": null,
"versions": [
{
"staging": false,
"number": 1,
"updated_at": "2021-09-20T16:06:04Z",
"deployed": false,
"locked": true,
"testing": false,
"active": false,
"comment": "",
"created_at": "2021-09-18T01:51:16Z",
"service_id": "<redacted>",
"deleted_at": null
},
],
"id": "<redacted>",
"customer_id": "<redacted>",
"version": 110,
"created_at": "2021-09-18T01:51:16Z",
"paused": false,
"type": "wasm",
"comment": "",
"updated_at": "2021-09-18T01:51:16Z"
}
]
Let me know if you need any further help to diagnose. Given @AWKIF's latest response I'm slightly suspicious if this is an issue relating to the combination of pagination and using an allowlist? But haven't dug into the code yet myself to confirm this.
from fastly-exporter.
Ok so it seems this is related to the method which we extract the next
page URI value from the link header, in uriFromLink
Here is a playground reduced test case showing the wrong URI being returned for the next
value from my response example above. I.e. its incorrectly returning the last
page and not the next
:
https://go.dev/play/p/x-KGLnAssWL
from fastly-exporter.
Related Issues (20)
- Cannot pull new Docker image HOT 3
- Support HTTP3 metrics
- Better logging for rt.fastly.com (Client.Timeout exceeded while awaiting headers) HOT 2
- remove tls_version="any" from fastly_rt_tls_total HOT 3
- metric consolidation for http2/http3
- Race condition between processing and scraping
- carnality explosion with fastly_rt_datacenter_info HOT 3
- Consider adding a way to (optionally) track tokens HOT 2
- Reduce output size of metrics endpoint HOT 3
- Expose fastly rt api 'recorded' timestamp in prometheus metrics HOT 3
- Add all those wild new Compute@Edge metrics
- Missing Docker images HOT 9
- RT API meta-metric HOT 3
- Metric Timestamps HOT 15
- Add datcenters API enricment HOT 2
- Add partial docker tags HOT 4
- iterating http_sd support towards generic discovery HOT 21
- Continue starting up if fastly is down HOT 1
- Exporter should set it's own custom user-agent HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastly-exporter.