Skip to content
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

Adds AppInsightsTelemetryConsumer, new app-insights export subpath and README updates. #20479

Merged
merged 5 commits into from
Apr 5, 2024

Conversation

seanimam
Copy link
Contributor

@seanimam seanimam commented Apr 4, 2024

Description

  • Adds the concrete implementation of ITelemetryConsumer, AppInsightsTelemetryConsumer to the package and exports it under a new subpath /app-insights
  • Flips README xample 1 and 2 around so the Azure App insights example is first
  • README.md updated with usage of new AppInsightsTelemetryConsumer

@github-actions github-actions bot added area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct base: main PRs targeted against main branch labels Apr 4, 2024
@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Apr 4, 2024
@seanimam seanimam requested review from alexvy86 and a team April 4, 2024 23:12
@seanimam seanimam marked this pull request as ready for review April 4, 2024 23:13
Copy link
Contributor

@alexvy86 alexvy86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments below but overall LGTM

Comment on lines 64 to 66
Congrats, that's it for now! If you've decided to use Azure App Insights, we have designed useful prebuilt queries for you that utilize the generated telemetry

Before you can get telemetry sent to Azure App Insights, you'll need to create an Instance of App Insights on Azure. Then you'll be able to create an Azure App Insights client that you can easily turn into a ITelemetryConsumer and finally hook it up to container telemetry. [Learn more about Azure App Insights](https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview)
**It's important to note that while you can create your own custom implementation of `ITelemetryConsumer` for sending telemetry to App Insights, if you change the shape of the telemetry emitted from our implementation, `AppInsightsTelemetryConsumer`, we make no guarentess of our provided App Insights queries or dashboards working as expected.**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this bit and add it when the queries are here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


### Step 1: Install the @fluidframework/fluid-telemetry package and Azure App Insights package dependencies
## Example 2: Extending ITelemtryConsumer to send Fluid telemetry to a custom destination
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

Suggested change
## Example 2: Extending ITelemtryConsumer to send Fluid telemetry to a custom destination
## Example 2: Extending ITelemetryConsumer to send Fluid telemetry to a custom destination

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

class AppInsightsTelemetryConsumer implements ITelemetryConsumer {
constructor(private readonly appInsightsClient: ApplicationInsights) {}

// 2: This is our implementation of ITelemetryConsumer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably remove section 2 here, since Step 2 above has this same class definition?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see how that might be confusing. I've updated the example to be as if you're imported the implementation from another file.

@seanimam seanimam merged commit 967e6bc into microsoft:main Apr 5, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct base: main PRs targeted against main branch dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants