-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(docs): Adding App Insights Configuration Page #2820
Merged
xoscar
merged 2 commits into
main
from
2819-docs-add-configuration-page-for-azure-app-insights
Jun 26, 2023
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
93 changes: 93 additions & 0 deletions
93
docs/docs/configuration/connecting-to-data-stores/azure-app-insights.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Azure App Insights | ||
|
||
If you want to use [Azure App Insights](https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview) as the trace data store, you can use the native connection from Tracetest to pull telemetry data. | ||
|
||
:::tip | ||
Examples of configuring Tracetest with Azure App Insights can be found in the [`examples` folder of the Tracetest GitHub repo](https://github.com/kubeshop/tracetest/tree/main/examples). | ||
::: | ||
|
||
## Direct Connection - Configure Tracetest to Use Azure App Insights as a Trace Data Store | ||
|
||
Configure Tracetest to be aware that it has to fetch trace data from Azure App Insights. | ||
|
||
Tracetest uses the Golang [Azure SDK](https://learn.microsoft.com/en-us/azure/developer/go/) library to pull to fetch trace data. | ||
|
||
### Tracetest Direct Connection to Azure App Insights with the Web UI | ||
|
||
In the Web UI, (1) open Settings, and, on the (2) Configure Data Store tab, select (3) Azure App Insights. | ||
|
||
![Azure App Insights Direct Connection Settings](../img/appinsights-direct.png) | ||
|
||
From the configuration page, add your [App Insights API Access Token](https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-azure-ad-api). Or if you are running Tracetest from a authorized container, you can use the default Active Directory Authentication. | ||
|
||
Finally, add the resource ARM ID for the Azure App Insights instance. | ||
|
||
### Tracetest Direct Connection to Azure App Insights with the CLI | ||
|
||
Or, if you prefer using the CLI, you can use this file config. | ||
|
||
```yaml | ||
type: DataStore | ||
spec: | ||
name: AzureAppInsights | ||
type: azureappinsights | ||
default: true | ||
azureappinsights: | ||
connectionType: direct | ||
resourceArmId: <your-arm-id> | ||
accessToken: <your-access-token> | ||
useAzureActiveDirectoryAuth: false | ||
``` | ||
|
||
Run this command in the terminal and specify the file above. | ||
|
||
```bash | ||
tracetest apply datastore -f my/data-store/file/location.yaml | ||
``` | ||
|
||
<!-- Add back once the examples are ready --> | ||
<!-- :::tip | ||
To learn more, [read the recipe on running a sample app with AWS X-Ray and Tracetest](../../examples-tutorials/recipes/running-tracetest-with-aws-x-ray.md). | ||
::: --> | ||
|
||
## OpenTelemetry Collector | ||
|
||
You can configure Tracetest to listen for incoming telemetry data from ports `4317` and `4318` for gRPC and REST accordingly, giving you the option to stream the information to both Azure App Insights and Tracetest at the same time. | ||
|
||
:::tip | ||
Need help configuring the [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector-contrib) so send trace data from your application to Azure App Insights? Read more in [the reference page here](../opentelemetry-collector-configuration-file-reference). | ||
::: | ||
|
||
### Tracetest OpenTelemetry Collector connection to Azure App Insights with the Web UI | ||
|
||
In the Web UI, (1) open Settings, and, on the (2) Configure Data Store tab, select (3) Azure App Insights, (4) Select Open Telemetry Collector as Connection Type. | ||
|
||
![Azure App Insights Otel Connection Settings](../img/appinsights-otel.png) | ||
|
||
From the configuration page, copy and customize the OpenTelemetry configuration YAML including the instrumentation key. | ||
|
||
### Tracetest OpenTelemetry Collector connection to Azure App Insights with the CLI | ||
|
||
Or, if you prefer using the CLI, you can use this file config. | ||
|
||
```yaml | ||
type: DataStore | ||
spec: | ||
name: AzureAppInsights | ||
type: azureappinsights | ||
default: true | ||
azureappinsights: | ||
connectionType: collector | ||
useAzureActiveDirectoryAuth: false | ||
``` | ||
|
||
Run this command in the terminal and specify the file above. | ||
|
||
```bash | ||
tracetest apply datastore -f my/data-store/file/location.yaml | ||
``` | ||
|
||
<!-- Add back once the examples are ready --> | ||
<!-- :::tip | ||
To learn more, [read the recipe on running a sample app with AWS X-Ray and Tracetest](../../examples-tutorials/recipes/running-tracetest-with-aws-x-ray.md). | ||
::: --> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.