You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/send-data/hosted-collectors/cloud-to-cloud-integration-framework/github-copilot-source.md
+19-20Lines changed: 19 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,34 +14,32 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
14
14
15
15
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.
16
16
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.
18
18
19
19
## Data collected
20
20
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 |
29
25
30
26
## Setup
31
27
32
28
### Vendor configuration
33
29
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
+
35
32
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.
37
34
38
35
#### Pre-requisites
36
+
39
37
1. The fine-grained PAT token must have at least one of the following permission sets:
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).
43
41
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.
45
43
46
44
### Source configuration
47
45
@@ -60,7 +58,7 @@ To configure a Github Copilot Source, follow the steps below:
60
58
1.**PAT Token**. Enter the PAT token generated from the [Github Copilot platform](#vendor-configuration).
61
59
1. (Optional) **Collect Team Metric Logs**. Select this checkbox to collect the team metric logs from the Copilot platform.
62
60
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.
64
62
1. When you are finished configuring the Source, click **Save**.
65
63
66
64
## JSON schema
@@ -78,14 +76,15 @@ Sources can be configured using UTF-8 encoded JSON files with the Collector Mana
78
76
| Parameter | Type | Required | Default | Description | Example |
79
77
|:--|:--|:--|:--|:--|:--|
80
78
| 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 |
85
83
| patToken | String | Yes |`null`| PAT Token of the account. | pat_gitxxxxx |
86
84
| collectTeamMetrics | Boolean | No |`false`| Specify if we need to collect the team metrics logs. | true |
87
85
| teamNames | String Array | No |`null`| List of teams of which the metrics should be collected. | dev-team |
88
86
| metricPeriodInDays | Integer | Yes | 1 | Specifies the number of past days for which metrics data should be collect. Range 1-28. | 2 |
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.
104
103
105
104
## FAQ
106
105
107
106
:::info
108
107
Click [here](/docs/c2c/info) for more information about Cloud-to-Cloud sources.
0 commit comments