Skip to content

Commit 8e34bfe

Browse files
authored
Update github-copilot-source.md
1 parent 6cf1d9c commit 8e34bfe

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

docs/send-data/hosted-collectors/cloud-to-cloud-integration-framework/github-copilot-source.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,32 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
1414

1515
Github is a web-based platform that uses Git for version control and collaboration in software development. It enables developers to create, store, manage, and share code in repositories, track changes, and collaborate on projects with features such as branches, pull requests, and issue tracking.
1616

17-
Copilot is an AI-powered pair programmer that integrates with various development environments (like Visual Studio Code). It leverages machine learning models trained on publicly available code to provide real-time code suggestions, explanations, and even generate entire functions or tests based on context and natural language prompts. Copilot's features aim to enhance developer productivity, accelerate coding, and improve code quality.
17+
Copilot is an AI-powered pair programmer that integrates with various development environments. It leverages machine learning models trained on publicly available code to provide real-time code suggestions, explanations, and even generate entire functions or tests based on context and natural language prompts. Copilot's features aim to enhance developer productivity, accelerate coding, and improve code quality.
1818

1919
## Data collected
2020

21-
| Source | Description |
22-
| :--- | :--- |
23-
| [Organization Metrics](https://docs.github.com/en/rest/copilot/copilot-metrics?apiVersion=2022-11-28#get-copilot-metrics-for-an-organization) | Provides aggregated usage data for Copilot features within an organization, including code completions, chat, and pull request summaries. |
24-
| [Team Metrics](https://docs.github.com/en/rest/copilot/copilot-metrics?apiVersion=2022-11-28#get-copilot-metrics-for-a-team) | Provides feature usage for specific teams, with breakdowns by language, editor, and model. |
25-
26-
:::note
27-
- The polling interval for both the api endpoints is 24 hours.
28-
:::
21+
| Source | Description | Polling interval |
22+
| :-- | :-- | :-- |
23+
| [Organization Metrics](https://docs.github.com/en/rest/copilot/copilot-metrics?apiVersion=2022-11-28#get-copilot-metrics-for-an-organization) | Provides aggregated usage data for Copilot features within an organization, including code completions, chat, and pull request summaries. | 24 hours |
24+
| [Team Metrics](https://docs.github.com/en/rest/copilot/copilot-metrics?apiVersion=2022-11-28#get-copilot-metrics-for-a-team) | Provides feature usage for specific teams, with breakdowns by language, editor, and model. | 24 hours |
2925

3026
## Setup
3127

3228
### Vendor configuration
3329

34-
You will need Organization name and PAT Token to configure the Github Copilot source.
30+
You are required to provide the **Organization Name** and **PAT Token** to configure the Github Copilot source.
31+
3532
1. **Organization Name**: Name of the organization. The name is not case sensitive.
36-
2. **PAT Token**: Fine-grained PAT(Personal Access Token) token of the account. Follow the steps from [here](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) to generate the fine-grained token. Configure a never-expiring fine-grained token for smooth integration.
33+
2. **PAT Token**: Fine-grained PAT(Personal Access Token) token of the account. Follow the steps from the [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) to generate the fine-grained token. Configure a never-expiring fine-grained token for smooth integration.
3734

3835
#### Pre-requisites
36+
3937
1. The fine-grained PAT token must have at least one of the following permission sets:
4038
- "Github Copilot Business" organization permissions (read).
4139
- "Administration" organization permissions (read).
42-
2. To access any of the above endpoints, the Copilot Metrics API access policy must be enabled for the organization (or organization containing the team if team metrics is configured).
40+
2. To access any of the above endpoints, the Copilot metrics API access policy must be enabled for the organization (or organization containing the team if team metrics is configured).
4341
3. Only organization owners and billing managers of the parent enterprise can view Copilot metrics.
44-
- So the PAT tokens need either (`manage_billing:copilot`, `read:org`), or `read:enterprise` scopes to use the endpoints. Refer [doc](https://docs.github.com/en/rest/copilot/copilot-metrics?apiVersion=2022-11-28#get-copilot-metrics-for-an-organization) for further details.
42+
- The PAT tokens need either (`manage_billing:copilot`, `read:org`), or `read:enterprise` scopes to use the endpoints. Refer to the [GitHub Documentation](https://docs.github.com/en/rest/copilot/copilot-metrics?apiVersion=2022-11-28#get-copilot-metrics-for-an-organization) for further details.
4543

4644
### Source configuration
4745

@@ -60,7 +58,7 @@ To configure a Github Copilot Source, follow the steps below:
6058
1. **PAT Token**. Enter the PAT token generated from the [Github Copilot platform](#vendor-configuration).
6159
1. (Optional) **Collect Team Metric Logs**. Select this checkbox to collect the team metric logs from the Copilot platform.
6260
1. **Team Names**. Write the team names of which you want to collect metric logs.
63-
1. **Metrics Period(in days)**. Specifies the number of past days for which metrics data should be collect. This is set to 1 by default. You can adjust it based on your needs.
61+
1. **Metrics Period(in days)**. Specifies the number of past days for which metrics data should be collect. This is set to 1 day by default. You can adjust it based on your needs.
6462
1. When you are finished configuring the Source, click **Save**.
6563

6664
## JSON schema
@@ -78,14 +76,15 @@ Sources can be configured using UTF-8 encoded JSON files with the Collector Mana
7876
| Parameter | Type | Required | Default | Description | Example |
7977
|:--|:--|:--|:--|:--|:--|
8078
| name | String | Yes | `null` | Type a desired name of the source. The name must be unique per Collector. This value is assigned to the [metadata](/docs/search/get-started-with-search/search-basics/built-in-metadata) field `_source`. | `"mySource"` |
81-
| description | String | No | `null` | Type a description of the source. | `"Testing source"`
82-
| category | String | No | `null` | Type a category of the source. This value is assigned to the [metadata](/docs/search/get-started-with-search/search-basics/built-in-metadata) field `_sourceCategory`. See [best practices](/docs/send-data/best-practices) for details. | `"mySource/test"`
83-
| fields | JSON Object | No | `null` | JSON map of key-value fields (metadata) to apply to the Collector or Source. Use the boolean field _siemForward to enable forwarding to SIEM.|`{"_siemForward": false, "fieldA": "valueA"}` |
84-
| organization | String | Yes | `null` | Name of your organization. | sanlabs |
79+
| description | String | No | `null` | Type a description of the source. | `"Testing source"` |
80+
| category | String | No | `null` | Type a category of the source. This value is assigned to the [metadata](/docs/search/get-started-with-search/search-basics/built-in-metadata) field `_sourceCategory`. See [best practices](/docs/send-data/best-practices) for details. | `"mySource/test"` |
81+
| fields | JSON Object | No | `null` | JSON map of key-value fields (metadata) to apply to the Collector or Source. Use the boolean field _siemForward to enable forwarding to SIEM.| `{"_siemForward": false, "fieldA": "valueA"}` |
82+
| organization | String | Yes | `null` | Name of your organization. | sanlabs |
8583
| patToken | String | Yes | `null` | PAT Token of the account. | pat_gitxxxxx |
8684
| collectTeamMetrics | Boolean | No | `false` | Specify if we need to collect the team metrics logs. | true |
8785
| teamNames | String Array | No | `null` | List of teams of which the metrics should be collected. | dev-team |
8886
| metricPeriodInDays | Integer | Yes | 1 | Specifies the number of past days for which metrics data should be collect. Range 1-28. | 2 |
87+
8988
### JSON example
9089

9190
```json reference
@@ -100,10 +99,10 @@ https://github.com/SumoLogic/sumologic-documentation/blob/main/static/files/c2c/
10099

101100
## Limitations
102101

103-
Due to the behavior of both APIs, data is only available for the previous day, there will be 24 hours latency at any given point in time. Refer [doc](https://docs.github.com/en/rest/copilot/copilot-metrics?apiVersion=2022-11-28#get-copilot-metrics-for-an-organization) for further details.
102+
Due to the behavior of both APIs, data is only available for the previous day, there will be 24 hours latency at any given point in time. Refer to the [Github Documentation](https://docs.github.com/en/rest/copilot/copilot-metrics?apiVersion=2022-11-28#get-copilot-metrics-for-an-organization) for further details.
104103

105104
## FAQ
106105

107106
:::info
108107
Click [here](/docs/c2c/info) for more information about Cloud-to-Cloud sources.
109-
:::
108+
:::

0 commit comments

Comments
 (0)