Skip to content

DOCS: use lower case header#5169

Merged
v1v merged 2 commits intoelastic:masterfrom
v1v:feature/update-docs-otel
May 14, 2021
Merged

DOCS: use lower case header#5169
v1v merged 2 commits intoelastic:masterfrom
v1v:feature/update-docs-otel

Conversation

@v1v
Copy link
Copy Markdown
Member

@v1v v1v commented Apr 27, 2021

Motivation/summary

If I use the lowercase header then it does work otherwise I get an error:

E0427 12:07:17.398505136    3317 call.cc:919]                validate_metadata: {"created":"@1619525237.398491209","description":"Illegal header key","file":"src/core/lib/surface/validate_metadata.cc","file_line":44,"offset":0,"raw_bytes":"41 75 74 68 6f 72 69 7a 61 74 69 6f 6e 'Authorization'\u0000"}
Exception while exporting Span batch.
Traceback (most recent call last):
  File "/tmp/workspace/ansible-plugin/.venv/lib/python3.8/site-packages/opentelemetry/sdk/trace/export/__init__.py", line 333, in _export_batch
    self.span_exporter.export(self.spans_list[:idx])  # type: ignore
  File "/tmp/workspace/ansible-plugin/.venv/lib/python3.8/site-packages/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/__init__.py", line 294, in export
    return self._export(spans)
  File "/tmp/workspace/ansible-plugin/.venv/lib/python3.8/site-packages/opentelemetry/exporter/otlp/proto/grpc/exporter.py", line 261, in _export
    self._client.Export(
  File "/tmp/workspace/ansible-plugin/.venv/lib/python3.8/site-packages/grpc/_channel.py", line 944, in __call__
    state, call, = self._blocking(request, timeout, metadata, credentials,
  File "/tmp/workspace/ansible-plugin/.venv/lib/python3.8/site-packages/grpc/_channel.py", line 926, in _blocking
    call = self._channel.segregated_call(
  File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 498, in grpc._cython.cygrpc.Channel.segregated_call
  File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 366, in grpc._cython.cygrpc._segregated_call
  File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 360, in grpc._cython.cygrpc._segregated_call
  File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 218, in grpc._cython.cygrpc._call
  File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 253, in grpc._cython.cygrpc._call
  File "src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi", line 61, in grpc._cython.cygrpc._raise_call_error
ValueError: metadata was invalid: ('Authorization', 'Bearer ****')

The above error happened with the below python OTEL dependencies:

  • opentelemetry-api
  • opentelemetry-sdk
  • opentelemetry-exporter-otlp
Installing collected packages: six, protobuf, opentelemetry-semantic-conventions, opentelemetry-api, opentelemetry-sdk, opentelemetry-proto, grpcio, googleapis-common-protos, backoff, opentelemetry-exporter-otlp-proto-grpc, opentelemetry-exporter-otlp
Successfully installed backoff-1.10.0 googleapis-common-protos-1.53.0 grpcio-1.37.0 opentelemetry-api-1.1.0 opentelemetry-exporter-otlp-1.1.0 opentelemetry-exporter-otlp-proto-grpc-1.1.0 opentelemetry-proto-1.1.0 opentelemetry-sdk-1.1.0 opentelemetry-semantic-conventions-0.20b0 protobuf-3.15.8 six-1.15.

@ghost
Copy link
Copy Markdown

ghost commented Apr 27, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #5169 updated

  • Start Time: 2021-05-13T11:30:54.324+0000

  • Duration: 40 min 45 sec

  • Commit: 484ea90

Test stats 🧪

Test Results
Failed 0
Passed 6294
Skipped 120
Total 6414

Trends 🧪

Image of Build Times

Image of Tests

@v1v v1v marked this pull request as ready for review May 13, 2021 11:30
@v1v v1v requested review from a team May 13, 2021 11:30
Copy link
Copy Markdown
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

LGTM. I think it might be worth opening an issue on opentelemetry-python, seems to me they should be lowercasing the headers.

@v1v
Copy link
Copy Markdown
Member Author

v1v commented May 14, 2021

I just reported open-telemetry/opentelemetry-python#1851

@v1v v1v merged commit 4e76ec6 into elastic:master May 14, 2021
@v1v v1v deleted the feature/update-docs-otel branch May 14, 2021 09:00
@v1v v1v added docs Team:Docs Label for the Observability docs team labels May 14, 2021
mergify bot pushed a commit that referenced this pull request May 14, 2021
(cherry picked from commit 4e76ec6)
mergify bot pushed a commit that referenced this pull request May 14, 2021
(cherry picked from commit 4e76ec6)
mergify bot pushed a commit that referenced this pull request May 14, 2021
(cherry picked from commit 4e76ec6)
@eddyleelin
Copy link
Copy Markdown

Shouldn't this update also apply to the description of OTEL_EXPORTER_OTLP_HEADERS right under where you had made the change in the doc?

This line
Authorization header that includes the Elastic APM Secret token or API key: "Authorization=ApiKey api_key".
Should then be changed to
Authorization header that includes the Elastic APM Secret token or API key: "authorization=ApiKey api_key".

https://github.com/v1v/apm-server/blob/484ea907ed9ac848b8af0e5b64dfc13452ccbb9e/docs/guide/opentelemetry-elastic.asciidoc#instrument-applications-1

axw pushed a commit that referenced this pull request May 24, 2021
(cherry picked from commit 4e76ec6)

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
axw pushed a commit that referenced this pull request May 24, 2021
(cherry picked from commit 4e76ec6)

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
axw pushed a commit that referenced this pull request May 24, 2021
(cherry picked from commit 4e76ec6)

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Team:Docs Label for the Observability docs team v7.12.0 v7.13.0 v7.14.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants