import environmentService from '../services/environment.service.js';
export async function getRoutes() {
    const environments = await environmentService.getEnvironmentsWithOtlpSettings();
    return environments.flatMap((env) => {
        if (env.otlp_settings?.endpoint && env.otlp_settings?.headers) {
            return [
                {
                    routingId: `environment:${env.id}`,
                    routingEndpoint: env.otlp_settings?.endpoint,
                    routingHeaders: env.otlp_settings?.headers || {}
                }
            ];
        }
        return [];
    });
}
//# sourceMappingURL=otlp.js.map