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 dependency mismatch #2028

Open
seBasKov opened this issue Jan 10, 2025 · 0 comments
Open

Opentelemetry dependency mismatch #2028

seBasKov opened this issue Jan 10, 2025 · 0 comments

Comments

@seBasKov
Copy link

seBasKov commented Jan 10, 2025

Hi everyone! I am stumbling into some issues with using mlserver 1.6 and Opentelemetry.

When I call:
poetry run opentelemetry-instrument --metrics_exporter none --traces_exporter otlp mlserver start some-project/

With the following envars set:

OTEL_SERVICE_NAME: "mlserver.serve"
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "0.0.0.0:4317"

I get:

  File "/Users/***/Library/Caches/pypoetry/virtualenvs/some-project-XRSGcY6i-py3.10/lib/python3.10/site-packages/mlserver/cli/main.py", line 48, in start
    await server.start(models_settings)
  File "/Users/***/Library/Caches/pypoetry/virtualenvs/some-project-XRSGcY6i-py3.10/lib/python3.10/site-packages/mlserver/server.py", line 137, in start
    await servers_task
  File "/Users***/Library/Caches/pypoetry/virtualenvs/some-project-XRSGcY6i-py3.10/lib/python3.10/site-packages/mlserver/grpc/server.py", line 112, in start
    self._create_server()
  File "/Users/***/Library/Caches/pypoetry/virtualenvs/some-project-XRSGcY6i-py3.10/lib/python3.10/site-packages/mlserver/grpc/server.py", line 71, in _create_server
    self._server = aio.server(
  File "/Users/***/Library/Caches/pypoetry/virtualenvs/some-project-XRSGcY6i-py3.10/lib/python3.10/site-packages/opentelemetry/instrumentation/grpc/__init__.py", line 390, in server
    kwargs["interceptors"].insert(
AttributeError: 'tuple' object has no attribute 'insert'

It seems like:
https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumen[…]ntation-grpc/src/opentelemetry/instrumentation/grpc/init.py

Doesn't expect the tuple that is passed from:
https://github.com/SeldonIO/MLServer/blob/master/mlserver/grpc/server.py#L73

Looks like a bug or do you see that there might be something else missing from my side?

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

No branches or pull requests

1 participant