-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Labels
Description
Component(s)
receiver/github
Describe the issue you're reporting
When using the githubreceiver to scrape pull requests and commits, the collector consistently returns 502 Bad Gateway or 504 Gateway Timeout errors, even with a valid GitHub token.
I tried to curl the GraphQL API with the same token and it is working fine.
Example of errors
error githubscraper/github_scraper.go:169 error getting pull requests: {error 26 0 returned error 504: {"data":null,"errors":[{"message":"<!DOCTYPE html> ... Unicorn! · GitHub ..."}]}}
error githubscraper/github_scraper.go:169 error getting pull requests: {error 26 0 returned error 502: {"data":null,"errors":[{"message":"502 Bad Gateway (HTML content truncated)"}]}}
{"resource": {"service.name": "otelcol-contrib", "service.version": "0.137.0"}, "otelcol.component.id": "github", "otelcol.component.kind": "receiver", "otelcol.signal": "metrics"}
We are using the 0.137.0 version of opentelemetry-collector-contrib and here is the configuration file
extensions:
bearertokenauth/github:
token: ${env:GH_TOKEN}
config:
receivers:
github:
initial_delay: 1s
collection_interval: 2m
scrapers:
scraper:
github_org: myorg
search_query: "org:myorg repo:myorg/myrepo1 repo:myorg/myrepo2"
auth:
authenticator: bearertokenauth/github
service:
extensions: [bearertokenauth/github, health_check]
pipelines:
metrics:
receivers: [github]
processors: []
exporters: [otlphttp]
traces: {}
exporters:
otlphttp:
endpoint: http://alloy.metric.svc.cluster.local:4318
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.