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

improve exporter module documentation and readme #292

Merged
merged 5 commits into from
Oct 18, 2021

Conversation

tsloughter
Copy link
Member

No description provided.

@tsloughter tsloughter requested a review from a team October 13, 2021 23:24
@codecov
Copy link

codecov bot commented Oct 13, 2021

Codecov Report

Merging #292 (21906cf) into main (52f24d8) will decrease coverage by 4.90%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #292      +/-   ##
==========================================
- Coverage   37.24%   32.33%   -4.91%     
==========================================
  Files          46       42       -4     
  Lines        3257     3470     +213     
==========================================
- Hits         1213     1122      -91     
- Misses       2044     2348     +304     
Flag Coverage Δ
api 34.49% <ø> (-30.38%) ⬇️
elixir 14.23% <ø> (ø)
erlang 35.71% <50.00%> (-1.53%) ⬇️
exporter 19.58% <50.00%> (-0.18%) ⬇️
sdk 79.19% <ø> (+2.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ntelemetry_exporter/src/opentelemetry_exporter.erl 76.86% <50.00%> (-0.18%) ⬇️
.../opentelemetry_api/src/otel_propagator_b3multi.erl 0.00% <0.00%> (-86.67%) ⬇️
...opentelemetry_api/src/otel_propagator_b3single.erl 0.00% <0.00%> (-85.72%) ⬇️
...opentelemetry_api/src/otel_propagator_text_map.erl 0.00% <0.00%> (-68.58%) ⬇️
apps/opentelemetry_api/src/otel_propagator_b3.erl 0.00% <0.00%> (-63.64%) ⬇️
.../opentelemetry_api/src/otel_propagator_baggage.erl 0.00% <0.00%> (-63.24%) ⬇️
...elemetry_api/src/otel_propagator_trace_context.erl 0.00% <0.00%> (-51.03%) ⬇️
...try_api/src/otel_propagator_text_map_composite.erl 0.00% <0.00%> (-46.67%) ⬇️
apps/opentelemetry_api/src/otel_propagator.erl 50.00% <0.00%> (-37.50%) ⬇️
apps/opentelemetry_api/src/opentelemetry.erl 40.31% <0.00%> (-35.94%) ⬇️
... and 19 more

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 52f24d8...21906cf. Read the comment docs.

@@ -69,15 +71,34 @@
-define(DEFAULT_PORT, 4317).
-define(DEFAULT_TRACES_PATH, "v1/traces").

-record(state, {protocol :: grpc | http_protobuf | http_json,
-type headers() :: [{unicode:chardata(), unicode:chardata()}].
-type scheme() :: http | https.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these get parsed to atoms? Line 70 has scheme as a string.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking it was all parsed into atoms but ultimately it needs to be a string for the call to uri_string:normalize. Except grpcbox parses it to an atom.. ugh, guess its both.

Copy link
Member

@ferd ferd left a comment

Choose a reason for hiding this comment

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

Mostly good, only things I'd adjust are pointing out how to safely set up TLS for the exporter and fixing the CI issue with typespecs


``` erlang
{opentelemetry_exporter,
[{otlp_endpoint, "https://api.honeycomb.io:443"},
Copy link
Member

Choose a reason for hiding this comment

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

it might be good to add a note that SSL options aren't provided with this config. There's a new way to configure them and we could point out to https://erlef.github.io/security-wg/secure_coding_and_deployment_hardening/ssl for ways to safely configure it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like I need to update the actual module to accept SSL args first though? And then it'd be based on these docs? https://erlef.github.io/security-wg/secure_coding_and_deployment_hardening/inets

Copy link
Member

Choose a reason for hiding this comment

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

I thought #266 accomplished that already

Copy link
Member Author

Choose a reason for hiding this comment

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

Only for grpc. Looks like httpc never got any update.

Copy link
Member

Choose a reason for hiding this comment

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

ah damn. Then yeah it'd need similar support. I guess we can't hold back the PR for this though, and it'd be better tracked as a follow-up. Approving with the assumption the typespec in the other comment will be handled.

apps/opentelemetry_exporter/src/opentelemetry_exporter.erl Outdated Show resolved Hide resolved
@tsloughter tsloughter merged commit fab724a into open-telemetry:main Oct 18, 2021
@tsloughter tsloughter deleted the exporter-docs branch October 18, 2021 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants