Skip to content

Conversation

@sfriberg
Copy link
Contributor

Support simple authentication protocols on OTLP HTTP exporters as discussed in, #4590

@sfriberg sfriberg requested a review from a user July 21, 2022 19:45
@sfriberg sfriberg requested a review from Oberon00 as a code owner July 21, 2022 19:45
@codecov
Copy link

codecov bot commented Jul 21, 2022

Codecov Report

Merging #4630 (151aa5d) into main (2ef73c8) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #4630      +/-   ##
============================================
+ Coverage     90.05%   90.11%   +0.05%     
- Complexity     5066     5073       +7     
============================================
  Files           581      582       +1     
  Lines         15618    15641      +23     
  Branches       1497     1500       +3     
============================================
+ Hits          14065    14095      +30     
+ Misses         1098     1092       -6     
+ Partials        455      454       -1     
Impacted Files Coverage Δ
...elemetry/exporter/internal/auth/Authenticator.java 100.00% <100.00%> (ø)
...xporter/internal/okhttp/OkHttpExporterBuilder.java 91.52% <100.00%> (+1.32%) ⬆️
...metry/sdk/metrics/export/PeriodicMetricReader.java 87.14% <0.00%> (-2.86%) ⬇️
...emconv/resource/attributes/ResourceAttributes.java 100.00% <0.00%> (ø)
.../opentelemetry/exporter/prometheus/Serializer.java 86.44% <0.00%> (+0.42%) ⬆️
...y/exporter/internal/marshal/CodedOutputStream.java 71.00% <0.00%> (+1.18%) ⬆️
...metry/exporter/internal/okhttp/OkHttpExporter.java 95.23% <0.00%> (+9.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ef73c8...151aa5d. Read the comment docs.

(Route route, Response rspns) -> {
Request.Builder requestBuilder = rspns.request().newBuilder();
finalAuthenticator.getHeaders(
ah -> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know this API. What's the type of ah? Can we make the variable name more expressive? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

expanded to authHeaders

Copy link
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

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

Bunch of small comments. Thanks!

sfriberg and others added 8 commits July 25, 2022 15:39
…internal/auth/Authenticator.java

Co-authored-by: jack-berg <[email protected]>
…internal/auth/Authenticator.java

Co-authored-by: jack-berg <[email protected]>
…internal/auth/Authenticator.java

Co-authored-by: jack-berg <[email protected]>
…internal/auth/Authenticator.java

Co-authored-by: jack-berg <[email protected]>
…internal/okhttp/OkHttpExporterBuilder.java

Co-authored-by: jack-berg <[email protected]>
Copy link
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

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

Interested if the contract needs to be void getHeaders(Consumer<Map<String, String>>) or if Map<String, String> getHeaders() would suffice. But looks good otherwise.

Thanks!

@sfriberg sfriberg requested a review from jkwatson July 28, 2022 16:56
Copy link
Contributor

@jkwatson jkwatson left a comment

Choose a reason for hiding this comment

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

I don't know enough to know if this is sufficient for all the use-cases needed, but as long as it's just internal for now, 👍🏽

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.

3 participants