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.
- If in the dashboard of the second point, you try to configure DOTNET-RESOURCE-SERVICE-ENDPOINTURL in the environment variable, and at this point, you don't know who to point to. In theory, it should point to the dashboard itself. But after trying, it cannot be used normally.
-
如何添加外部的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面板的。
- 如果在第二点的dashboard中,尝试在环境变量中配置 DOTNET_RESOURCE_SERVICE_ENDPOINT_URL, 这时候不知道要指向谁了。理论上,应该是指向dashboard自身。但是尝试后,无法正常使用。
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面板的。