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

[tempo-distributed] Add distributor OTLP receiver advanced config #1365

Merged
merged 13 commits into from
May 19, 2022
Merged

[tempo-distributed] Add distributor OTLP receiver advanced config #1365

merged 13 commits into from
May 19, 2022

Conversation

ben-natan
Copy link
Contributor

This adds the possibility to configure the distributor's OTLP receiver with advanced options. My initial need for this comes from this issue: grafana/tempo#860.

The advanced configuration can be found here

Signed-off-by: Adrien Bennatan adrien.ben-natan@ensta-paris.fr

Signed-off-by: Adrien Bennatan <adrien.ben-natan@ensta-paris.fr>
@ben-natan ben-natan marked this pull request as draft May 10, 2022 10:06
Signed-off-by: Adrien Bennatan <adrien.ben-natan@ensta-paris.fr>
@ben-natan ben-natan marked this pull request as ready for review May 10, 2022 10:26
ben-natan and others added 3 commits May 11, 2022 12:59
Signed-off-by: Adrien Bennatan <adrien.ben-natan@ensta-paris.fr>
Signed-off-by: Adrien Bennatan <adrien.ben-natan@ensta-paris.fr>
@joe-elliott
Copy link
Member

joe-elliott commented May 16, 2022

I like this addition, thanks! However, it feels like the config belongs under the traces: block where the other receiver config is. Can we move this additional config there?

traces:
  otlp:
    http: false
    grpc: false

I don't know a ton about helm, but it would be awesome if we could take either true or an object {} under traces.otlp.http. If true then just enable with the default endpoint. If an object then use the object directly as the receiver settings.

@ben-natan
Copy link
Contributor Author

I don't know a ton about helm, but it would be awesome if we could take either true or an object {} under traces.otlp.http. If true then just enable with the default endpoint. If an object then use the object directly as the receiver settings.

I see 3 possibilities:

  1. Take either true or an object under traces.otlp.http but I haven't found a way to do it without type checks and I don't think this is good practice
  2. Add the config under distributor.config.receivers.otlp.protocols.http like I did in the PR at the time of opening it.
  3. Introduce a breaking change and add the traces.otlp.http.enabled and traces.otlp.http.receiverConfig keys

Which do you think is best?

@joe-elliott
Copy link
Member

joe-elliott commented May 17, 2022

I like option 3. Is it a breaking change? A user can specify:

traces:
  otlp:
    http:
      enabled: true

and we could default the receiverConfig to the existing one which is just the endpoint. They could also specify both if they wanted more detailed config:

traces:
  otlp:
    http:
      enabled: true
      receiverConfig: { custom config }

@ben-natan
Copy link
Contributor Author

Is it a breaking change?

Users that currently have

traces:
  otlp:
    http: true

would need to adapt to the new way of enabling http.

# Conflicts:
#	charts/tempo-distributed/Chart.yaml
@joe-elliott
Copy link
Member

@ben-natan yikes, of course. Unsure how i missed that. I'm ok with the breaking change but let's up the minor rev to correctly signal it.

Thank you!

ben-natan added 3 commits May 18, 2022 11:15
Signed-off-by: Adrien Bennatan <adrien.ben-natan@ensta-paris.fr>
Signed-off-by: Adrien Bennatan <adrien.ben-natan@ensta-paris.fr>
Signed-off-by: Adrien Bennatan <adrien.ben-natan@ensta-paris.fr>
@joe-elliott
Copy link
Member

This is looking really good @ben-natan. I'd like to request one more change if you have the time. Since this is a breaking change to move to this style of receiver configuration can we go ahead and do the opencensus, zipkin and jaeger recevier types. Otherwise we'll just find ourselves back in this position in a few months.

ben-natan added 4 commits May 19, 2022 11:50
Signed-off-by: Adrien Bennatan <adrien.ben-natan@ensta-paris.fr>
Signed-off-by: Adrien Bennatan <adrien.ben-natan@ensta-paris.fr>
Signed-off-by: Adrien Bennatan <adrien.ben-natan@ensta-paris.fr>
Signed-off-by: Adrien Bennatan <adrien.ben-natan@ensta-paris.fr>
Copy link
Member

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work! Thanks @ben-natan

@joe-elliott joe-elliott merged commit 265f8c5 into grafana:main May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants