Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instruct AppHost to forward signals to another OTEL collector #6964

Open
1 task done
Kralizek opened this issue Dec 18, 2024 · 3 comments
Open
1 task done

Instruct AppHost to forward signals to another OTEL collector #6964

Kralizek opened this issue Dec 18, 2024 · 3 comments
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-telemetry untriaged New issue has not been triaged

Comments

@Kralizek
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I am experimenting with embedding a OTEL collector in my AppHost.

There are different reasons to do that:

  • test the configuration before deploying the OTEL collector container
  • simulate the OTEL pipeline that will be once deployed (e.g. prepare Grafana dashboards locally and export them once deployed)

I have a simple experiment that starts the AWS OTEL collector container using

var otel = builder.AddContainer("otel", "aws-observability/aws-otel-collector", "latest")
                .WithImageRegistry("public.ecr.aws")
                .WithEnvironment("AWS_REGION", region.SystemName)
                .WithEnvironment("AWS_PROFILE", profileName)
                .WithBindMount(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".aws"), "/home/aoc/.aws")
                .WithBindMount("./otel-config.yaml", "/etc/otel-config.yaml")
                .WithHttpEndpoint(name: "grpc", targetPort: 4317)
                .WithHttpEndpoint(name: "http", targetPort: 4318);

I then pass the endpoint to the projects

var api = builder.AddProject<Projects.API>("api")
                 .WithReference(database)
                 .WithReference(aws)
                 .WaitFor(database)
                 .WithEnvironment("OTEL_EXPORTER_OTLP_ENDPOINT", otel.GetEndpoint("grpc"));

Unfortunately, this overrides the settings that Aspire needs to pass to make the Dashboard work.

Describe the solution you'd like

Ideally, I'd like to be able to instruct the DistributedApplication to forward all incoming signals to my OTEL collector.

Additional context

No response

@Kralizek
Copy link
Author

Cool, thanks!

From what I see, the collector is forwarding to the dashboard, is that correct?

@davidfowl
Copy link
Member

That's correct.

@joperezr joperezr added untriaged New issue has not been triaged area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-telemetry labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-telemetry untriaged New issue has not been triaged
Projects
None yet
Development

No branches or pull requests

3 participants