Skip to content

Commit 3961da8

Browse files
marcinsiennicki95atoulmecrobert-1adrielp
authored
[Receiver GitHub] Improve Readme - metrics section (#38900)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Improve Readme - metrics section <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Closes #38891 <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.--> --------- Co-authored-by: Antoine Toulme <[email protected]> Co-authored-by: Curtis Robert <[email protected]> Co-authored-by: Adriel Perkins <[email protected]>
1 parent 680ad71 commit 3961da8

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

receiver/githubreceiver/README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ receivers:
7070
collection_interval: 60s
7171
scrapers:
7272
scraper:
73-
metrics:
73+
metrics: #Optional
7474
vcs.contributor.count:
7575
enabled: true
76-
github_org: myfancyorg
77-
search_query: "org:myfancyorg topic:o11yalltheway" #Recommended optional query override, defaults to "{org,user}:<github_org>"
78-
endpoint: "https://selfmanagedenterpriseserver.com"
76+
github_org: <myfancyorg>
77+
search_query: "org:<myfancyorg> topic:<o11yalltheway>" # Recommended optional query override, defaults to "{org,user}:<github_org>"
78+
endpoint: "https://selfmanagedenterpriseserver.com" # Optional
7979
auth:
8080
authenticator: bearertokenauth/github
8181
service:
@@ -87,6 +87,16 @@ service:
8787
exporters: [...]
8888
```
8989
90+
### Configuration
91+
92+
`github_org` (**required**): Specify the GitHub organization or username to scrape.
93+
94+
`endpoint` (optional): Set this only when using a self-managed GitHub instance (e.g., `https://selfmanagedenterpriseserver.com` -- SHOULD NOT include `api` subdomain or `/graphql` context path).
95+
96+
`search_query` (optional): A filter to narrow down repositories. Defaults to `org:<github_org>` (or `user:<username>`). For example, use `repo:<org>/<repo>` to target a specific repository. Any valid GitHub search syntax is allowed.
97+
98+
`metrics` (optional): Enable or disable metrics scraping. See the [metrics documentation](./documentation.md) for details.
99+
90100
### Scraping
91101

92102
> Important:
@@ -100,6 +110,17 @@ see the [Scraping README][ghsread].
100110

101111
[ghsread]: internal/scraper/githubscraper/README.md#github-limitations
102112

113+
114+
### GitHub Personal Access Token (PAT) Setup
115+
116+
To create a GitHub Personal Access Token (PAT), please refer to the official [documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).
117+
118+
**Organization or Personal Access:**
119+
When generating the PAT, select the appropriate `Resource owner` — either your personal account or the organization and choose the correct `Repository access` type. For fine-grained tokens, explicitly configure the necessary `Repository permissions` or `Organization permissions`.
120+
121+
**Note**:
122+
The PAT must have read access to the target repositories. If the PAT doesn't have permission to access repositories in the target organization, only the repository count metric will be available. Detailed repository metrics cannot be fetched.
123+
103124
## Traces - Getting Started
104125

105126
Workflow tracing support is accomplished through the processing of GitHub

0 commit comments

Comments
 (0)