Replies: 1 comment 3 replies
-
The only resource server that ships as part of the project is the AppHost. If you run the dashboard standalone, there is no resource server provided for you.
That's correct.
It shouldn't point to the dashboard itself. The dashboard isn't a resource server. I wrote more on this here and prom3theu5/aspirational-manifests#118 |
Beta Was this translation helpful? Give feedback.
-
1. How to add an external ResourceServer?
In DashBoardClient, you can see that the retrieval of resources is obtained from the address ResourceServiceUrlVariableName. But there is no place to declare this variable. And this variable is currently not initialized in the environment variable.
2. If DashBoard is registered as a container in Host and published as compose.yml, as follows:
Var dashboard=builder AddContainer ("dashboard", "mcr. microsoft. com/dotnet/nightly/aspire dashboard");
Dashboard WithEndpoint (18889, 4317, name: "OTEL");
Dashboard WithEndpoint (18888, hostPort: 33456, scheme: "http", name: "webui");
Dashboard AsHttp2Service();
At this point, other resources cannot be published to the dashboard, and can only be set in the environment parameters of the resources as follows:
ApiService WithEnvironment ("OTEL-EXPORTER-OTLP_ENDPoint",“ http://dashboard:18889/" );
In this case, the resource and console log panels cannot be seen in the dashboard.
如何添加外部的ResourceServer?
在DashBoardClient中,可以看到资源的获取,是从ResourceServiceUrlVariableName这个地址中获取的。 但是没有地方可以去声明这个变量。且这个变量,当前也并没有在环境变量中初始化的情况。
如果把DashBoard做为容器注册在Host中,并发布成compose.yml,如下:
` csharp
var dashboard = builder.AddContainer("dashboard", "mcr.microsoft.com/dotnet/nightly/aspire-dashboard");
dashboard.WithEndpoint(18889, 4317, name: "OTEL");
dashboard.WithEndpoint(18888, hostPort: 33456, scheme: "http", name: "webui");
dashboard.AsHttp2Service();
`
这时候,无法将其它的资源,发布到dashboard中,仅能在资源的环境参数中,设置如下:
`csharp
apiService.WithEnvironment("OTEL_EXPORTER_OTLP_ENDPOINT", "http://dashboard:18889/");
`
这样的话,在dashboard中,是无法看到resource和console log面板的。
Beta Was this translation helpful? Give feedback.
All reactions