feat: add Aspire dashboard OTEL workflow

Add OTLP export wiring for the sidecar and dev scripts to launch the standalone Aspire Dashboard during development.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Kaya
2026-04-16 10:39:36 +02:00
co-authored by Copilot
parent 418946b854
commit f7d376fc41
11 changed files with 586 additions and 3 deletions
+45
View File
@@ -0,0 +1,45 @@
import { describe, expect, test } from 'bun:test';
import {
aspireDashboardContainerName,
aspireDashboardImage,
aspireDashboardUrls,
createAspireDashboardRunArgs,
createOpenTelemetryEnvironment,
} from '../../scripts/aspireDashboard';
describe('aspire dashboard helpers', () => {
test('creates the official standalone Docker command with mapped OTLP ports', () => {
expect(createAspireDashboardRunArgs()).toEqual([
'run',
'--rm',
'-d',
'--name',
aspireDashboardContainerName,
'-p',
'18888:18888',
'-p',
'4317:18889',
'-p',
'4318:18890',
'-e',
'ASPIRE_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS=true',
aspireDashboardImage,
]);
});
test('injects OTLP exporter settings for local Aspire development', () => {
expect(
createOpenTelemetryEnvironment(
{
PATH: 'C:\\tools',
},
aspireDashboardUrls.otlpGrpc,
),
).toEqual({
PATH: 'C:\\tools',
OTEL_EXPORTER_OTLP_ENDPOINT: aspireDashboardUrls.otlpGrpc,
OTEL_EXPORTER_OTLP_PROTOCOL: 'grpc',
});
});
});