open-telemetry / open-telemetry/opentelemetry-python-contrib

opentelemetry-instrument complains if you don't have otlp-proto-grpc installed

Open
#3,471 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
1.1k
Forks
1.1k
Avg merge
4d 15h
Merged PRs (30d)
16

Description

Describe your environment

OS: Mac
Python version: Python 3.9
Package version: opentelemetry-distro 0.53b1

What happened?

When you run the auto-instrumentation example published here without specifying a log exporter, two stacktraces are printed to the console at distro startup.

Steps to Reproduce

Run the example as specified before a workaround PR lands there (i.e. don't install otlp-proto-grpc or specify a log exporter).

Expected Result

Normal startup.

Actual Result

Two stacktraces are printed to the console

auto-instrumentation % opentelemetry-instrument --traces_exporter console --metrics_exporter none python server_automatic.py                    
Configuration of configurator failed
Traceback (most recent call last):
<snip>
    next(
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
<snip>
    raise RuntimeError(
RuntimeError: Requested component 'otlp_proto_grpc' not found in entry point 'opentelemetry_logs_exporter'
 * Serving Flask app 'server_automatic'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:8082
Press CTRL+C to quit
Additional context

No response

Would you like to implement a fix?

None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the linked auto-instrumentation example and the shown opentelemetry-instrument command, without installing otlp-proto-grpc or specifying a log exporter. Start by tracing distro startup configuration around the opentelemetry_logs_exporter entry point and otlp_proto_grpc selection. Done means the example starts normally without the two stacktraces.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.