microsoft / microsoft/aspire

OTLP appmodel component

Open
#5,062 2 comments 3 reactions 0 assignees View on GitHub
area-integrations area-telemetry
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 12h
Merged PRs (30d)
201

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

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

In watching the session yesterday on DataDog and how you need to configure Aspire to be able to tweak the OTLP settings, I am thinking that we should probably have an OTLP app model component.
Today if you want to send data elsewhere than the dashboard, you need to go add new environment variables to each application. Its kind of ugly.

### Describe the solution you'd like

We emit a whole bunch of OTLP vars today, but you don't get any control over them. I wonder if we should have an explicit component that you can add to the app model that is something like:

```
builder.AddTelemetrySettings("otel")
.UseDefaults(false)
.Endpoint("http://localhost:4317")
.ServiceName("AspireApp17")
.ResourceProperty("MyName", "MyValue");
```

That you can then reference from each project/ app/ container that you want to reference.
It would have the logic for all the attributes that we spit today, together with API endpoints over them, and other common settings. If you disable the defaults then it will no longer spit those.

It would make it easier if you were going to have an OTel collector component, as you can now point one of these at that.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reviewing Aspire's existing app-model components and how OTLP environment variables are currently emitted. Compare their APIs and configuration behavior with the proposed telemetry settings component, then define the component's scope, defaults, references, and endpoint/resource-setting behavior before identifying tests for the completed design.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.