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

[Opentelemetry Jaeger Exporter]: Fail to send large message #1061

Closed
nbigaouette opened this issue Sep 1, 2020 · 5 comments
Closed

[Opentelemetry Jaeger Exporter]: Fail to send large message #1061

nbigaouette opened this issue Sep 1, 2020 · 5 comments
Labels
backlog bug Something isn't working

Comments

@nbigaouette
Copy link

Describe your environment Describe any aspect of your environment relevant to the problem, including your Python version, platform, version numbers of installed dependencies, information about your cloud hosting provider, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on master.

  • Python v3.7.6
  • macOS Catalina 10.15.6
  • opentelemetry v0.12b0 (opentelemetry-sdk, opentelemetry-instrumentation-fastapi, opentelemetry-exporter-jaeger, opentelemetry-instrumentation-sqlalchemy)
  • fastapi v0.60.2
  • jaeger v1.19 (docker run --rm --name jaeger -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 -p 6831:6831/udp -p 6832:6832/udp -p 5778:5778 -p 16686:16686 -p 14268:14268 -p 14250:14250 -p 9411:9411 jaegertracing/all-in-one:1.19)

Steps to reproduce

I am exploring opentelemetry for my python application (fastapi). I have added the
sqlalchemy instrumentation to trace SQL queries. For some reason, one SQL query is quite large (55473 bytes). When the jaeger exporter attempts to send that query, I get the following backtrace:

Traceback (most recent call last):
  File ".venv/lib/python3.7/site-packages/opentelemetry/sdk/trace/export/__init__.py", line 208, in export
    self.span_exporter.export(self.spans_list[:idx])  # type: ignore
  File ".venv/lib/python3.7/site-packages/opentelemetry/exporter/jaeger/__init__.py", line 169, in export
    self.agent_client.emit(batch)
  File ".venv/lib/python3.7/site-packages/opentelemetry/exporter/jaeger/__init__.py", line 377, in emit
    udp_socket.sendto(buff, self.address)
OSError: [Errno 40] Message too long

What is the expected behavior?

No backtrace, query appearing in jaeger.

What is the actual behavior?

Backtrace above.

Additional context

Looking at the source, the jaeger exporter opens an udp socket and sends the buffer:

https://github.com/open-telemetry/opentelemetry-python/blob/v0.12.0/exporter/opentelemetry-exporter-jaeger/src/opentelemetry/exporter/jaeger/__init__.py#L386-L387

According to this SO, macOS has a limit of 9216 bytes for UDP packets: https://stackoverflow.com/questions/22819214/udp-message-too-long

The backtrace is unfortunate. Perhaps the long message should be split? Is there something in udp or jeager preventing this? Or maybe a check could be added about the length of the message as to prevent user confusion?

@nbigaouette nbigaouette added the bug Something isn't working label Sep 1, 2020
@rgstephens
Copy link

I also ran into this issue in conjunction with the SQLAlchemy instrumentation.

  • macOS Catalina 10.15.6
  • Jaeger 1.19.2
  • Python 3.7.9
  • OpenTelemetry 0.13b0

@rgstephens
Copy link

Discovered that this is a known issue with the Mac documented by Jaeger here along with instructions on how to make a configuration change on the Mac.

srikanthccv pushed a commit to srikanthccv/opentelemetry-python that referenced this issue Nov 1, 2020
@codeboten
Copy link
Contributor

@nbigaouette can you confirm if @rgstephens's solution works for you as well?

@github-actions
Copy link

github-actions bot commented Apr 9, 2021

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

@github-actions
Copy link

github-actions bot commented Jun 8, 2021

Closed as inactive. Feel free to reopen if this issue needs resolving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants