Closed JamesNK closed 1 month ago
Let's time this with #1585
@IEvangelist Where would this content go?
Something to keep in mind that people could want to gather browser telemetry from an app that is integrated into an Aspire solution, in which case they need to enable the OTLP HTTP endpoint, like so: https://github.com/dotnet/aspire/blob/9a59d122949de428321599c503da59c54fb673d6/playground/BrowserTelemetry/BrowserTelemetry.AppHost/Properties/launchSettings.json#L12
Or they have the standalone dashboard, and want to collect browser telemetry. In that case they need to set configuration when launching the container to expose the OTLP port, and to enable CORS.
With #1585 I'm intending that we cover how to use the browser OpenTelemetry npm packages to push to the Aspire dashboard (already have that sample ready).
For general configuration, I'd think that we want the content to land here: https://learn.microsoft.com/en-gb/dotnet/aspire/fundamentals/dashboard/standalone?tabs=bash
Ideally:
Issue for adding app host configuration page: https://github.com/dotnet/docs-aspire/issues/1602
Ideally:
- A tutorial under the standalone mode TOC item would be good if we have one.
- Dashboard configuration at dashboard configuration
- App host configuration somewhere. I don't there is a doc page on app host configuration. One should be added. It should go under app host TOC item.
Issue for adding app host configuration page: #1602
Agree on all fronts, and I commented on #1602 - we have content for launch profiles already.
I don't feel this is done. How do I as an Aspire user know that I can configure Aspire to receive browser telemetry? Low level configuration is good to link to, but it isn't a good way for people to discover this capability.
Todo:
I just realized that this was re-opened, sorry I didn't notice sooner @JamesNK. I need a bit of clarification on these asks.
Documentation about app host configuration
Isn't that what the CORS config section speaks too? If not, what am I missing. I looked through the linked PR in dotnet/aspire
and didn't see anything that stood out.
As for this:
Documentation that says you can do this
I can add something in the overview, if you're good with that?
Documentation about app host configuration
Isn't that what the CORS config section speaks too? If not, what am I missing. I looked through the linked PR in
dotnet/aspire
and didn't see anything that stood out.
No. That doc is for configuring the dashboard. Configuration for the app host is different. It comes from setting env vars in launchSettings.json. Note that some settings in the app host flow through the dashboard which is why it could seem like there is one thing, but they are different.
I can add something in the overview, if you're good with that?
I think there should be a section at https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/telemetry that discusses collecting browser telemetry.
It would talk through configuring OTLP HTTP endpoint, CORS, reading info from env vars for sending to the right location.
Awesome, thank you - that's the context I was missing.
i think i may need that section like now, please
A quick question for clarity on my end (prior to the doc additions being proposed above). Is it accurate to say:
In short - is there a way to wildcard CORS for the dashboard when running via AppHost?
That's a good question for @JamesNK
See https://github.com/dotnet/aspire/issues/4917
Associated WorkItem - 308083