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

Setup TLS Client for Zipkin #5085

Closed
wants to merge 1 commit into from

Conversation

mmorel-35
Copy link

@mmorel-35 mmorel-35 commented Jan 5, 2023

It is not actually possible to configure client TLS for Zipkin.

This add the following options :

  • otel.exporter.zipkin.certificate
  • otel.exporter.zipkin.client.key
  • otel.exporter.zipkin.client.certificate

This is highly inspired by the way it is done for Otlp Client

I'll add the coverage tests before making it ready to review.

Signed-off-by: Matthieu MOREL matthieu.morel35@gmail.com

@mmorel-35 mmorel-35 force-pushed the ssl-zipkin branch 2 times, most recently from 93e1c73 to 8947559 Compare January 5, 2023 13:44
@codecov
Copy link

codecov bot commented Jan 5, 2023

Codecov Report

Base: 91.06% // Head: 90.84% // Decreases project coverage by -0.21% ⚠️

Coverage data is based on head (5b5a722) compared to base (1f975b3).
Patch coverage: 21.27% of modified lines in pull request are covered.

❗ Current head 5b5a722 differs from pull request most recent head 9f4e070. Consider uploading reports for the commit 9f4e070 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5085      +/-   ##
============================================
- Coverage     91.06%   90.84%   -0.22%     
- Complexity     4888     4890       +2     
============================================
  Files           553      553              
  Lines         14453    14513      +60     
  Branches       1381     1395      +14     
============================================
+ Hits          13161    13184      +23     
- Misses          895      926      +31     
- Partials        397      403       +6     
Impacted Files Coverage Δ
...try/exporter/zipkin/ZipkinSpanExporterBuilder.java 69.23% <13.63%> (-28.50%) ⬇️
...er/zipkin/internal/ZipkinSpanExporterProvider.java 48.57% <28.00%> (-51.43%) ⬇️
.../opentelemetry/exporter/prometheus/Serializer.java 86.68% <0.00%> (-0.21%) ⬇️
...internal/view/ExponentialHistogramAggregation.java 100.00% <0.00%> (ø)
...etry/exporter/prometheus/PrometheusHttpServer.java 80.73% <0.00%> (+0.73%) ⬆️
...metry/sdk/metrics/export/PeriodicMetricReader.java 90.00% <0.00%> (+2.85%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jkwatson
Copy link
Contributor

jkwatson commented Jan 5, 2023

Are these properties in the specification? If not, we'll need to hold off until they are.

@mmorel-35
Copy link
Author

Hi @jkwatson ,

How can I check that ?

@jack-berg
Copy link
Member

The environment variables for zipkin are defined in the spec here.

@jkwatson
Copy link
Contributor

jkwatson commented Jan 5, 2023

The environment variables for zipkin are defined in the spec here.

So, these new ones proposed here are not in the specification. Before we can introduce new env vars, we'd really need them to be in the spec, unfortunately. The best way to get them there is to open up an issue with the specification and draft a PR to add the ones you need/want. However, I think (@jack-berg can confirm) that there's a current moratorium on adding any new environment variables until the configuration working-group has figured out a better long-term configuration solution.

@jack-berg
Copy link
Member

Yes there is currently a moratorium in place on adding new environment variables, as described here.

@mmorel-35
Copy link
Author

These variables are here to provide client securisation calling on Zipkin collector endpoint the same way it is done on OTPL collector, I see them being under the publicated restrictions. Let's hope it is going to be accepted

new RetryInterceptor(
retryPolicy,
(response) ->
RetryUtil.retryableHttpResponseCodes().contains(response.code())));
Copy link
Member

Choose a reason for hiding this comment

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

Is retry valid for zipkin? Is there some sort of specification of which status codes are retryable for zipkin? The status codes in RetryUtil.retryableHttpStatusResposneCodes() are defined in the OTLP specification.

Copy link
Author

@mmorel-35 mmorel-35 Jan 5, 2023

Choose a reason for hiding this comment

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

Why would it be different between the two ? Both are HTTP status code.
I'm way more interested by the securisation part , so if the retry is creating troubles I don't mind excluding it from this PR and keep it for another time

Copy link
Member

Choose a reason for hiding this comment

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

Why would it be different between the two ? Both are HTTP status code

Maybe zipkin uses those status codes differently and returns one in situations where a retry would not solve the problem.

Copy link
Author

Choose a reason for hiding this comment

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

I removed the retry part, so I keep this PR focused only on TLS client.

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jan 23, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2023

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants