-
Notifications
You must be signed in to change notification settings - Fork 651
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
Automatic instrumentation returns: unrecognized arguments: --trace-exporter #2264
Comments
This changed recently and was renamed to |
#2243 this pr updates the docs to reflect these changes. |
Even if I run |
@jonathan-s |
I got the same issue too . opentelemetry-instrumentation 0.30b1 |
@orsan0128 did you install the sdk as well? |
yep ,the opentelemetry-sdk 1.11.1 I tried to downgrade opentelemetry-sdk , opentelemetry-api == 1.8.0 I try to run command "opentelemetry-instrument --traces_exporter console python server_uninstrumented.py" & "pytheon client.py testing " again and the console output is normally . |
You don't seem to have distro installed. Please install |
I installed opentelemetry-distro == 0.30b1 too
But I try to downgrade all to 0.27b0 and otel-api , sdk to 1.8.0 and the console output are normally ! |
…ATH immediately (#1066)
I believe I have found the issue for me. I found that 1.10.0-0.29b0 works for me but not 1.11.0-0.30b0. Looking at the sitecustomize.py script, it had a change on 4/21 along with version 1.11.0-0.30b0. I reverted this change specifically, by moving the PYTHONPATH code back to within the "finally" and the span were produced once more. Here is the associated PR. Let me know if this fixed the issue for you as well! |
@jeremyvoss-microsoft The |
It is working fine for me: python3 -m venv venv
source venv/bin/activate
pip install flask opentelemetry-instrumentation opentelemetry-distro opentelemetry-instrumentation-flask
curl -O https://raw.githubusercontent.com/open-telemetry/opentelemetry-python/main/docs/examples/auto-instrumentation/server_uninstrumented.py
opentelemetry-instrument --traces_exporter console python server_uninstrumented.py
# separate terminal do `curl localhost:8082/server_request`
* Serving Flask app 'server_uninstrumented' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
None
{
"name": "/server_request",
"context": {
"trace_id": "0x036a62b07231c51c2cd9fb8db5d8de0b",
"span_id": "0x46378b949ea3c0fb",
"trace_state": "[]"
},
"kind": "SpanKind.SERVER",
"parent_id": null,
"start_time": "2022-05-19T03:18:34.192093Z",
"end_time": "2022-05-19T03:18:34.193532Z",
"status": {
"status_code": "UNSET"
},
"attributes": {
"http.method": "GET",
"http.server_name": "127.0.0.1",
"http.scheme": "http",
"net.host.port": 8082,
"http.host": "localhost:8082",
"http.target": "/server_request",
"net.peer.ip": "127.0.0.1",
"http.user_agent": "curl/7.82.0",
"net.peer.port": 33810,
"http.flavor": "1.1",
"http.route": "/server_request",
"http.status_code": 200
},
"events": [],
"links": [],
"resource": {
"telemetry.sdk.language": "python",
"telemetry.sdk.name": "opentelemetry",
"telemetry.sdk.version": "1.12.0rc1",
"telemetry.auto.version": "0.31b0",
"service.name": "unknown_service"
}
} the exact deps pip pulled in are $ pip freeze
click==8.1.3
Deprecated==1.2.13
Flask==2.1.2
importlib-metadata==4.11.3
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.1
opentelemetry-api==1.12.0rc1
opentelemetry-distro==0.31b0
opentelemetry-instrumentation==0.31b0
opentelemetry-instrumentation-flask==0.31b0
opentelemetry-instrumentation-wsgi==0.31b0
opentelemetry-sdk==1.12.0rc1
opentelemetry-semantic-conventions==0.31b0
opentelemetry-util-http==0.31b0
typing_extensions==4.2.0
Werkzeug==2.1.2
wrapt==1.14.1
zipp==3.8.0 It would be great if someone could provide a repro and open a new issue. |
I am on Windows 11. Here are my steps to reproduce:
But, if I move the code block back to the finally, I get the spans:
Notice that in both cases, I get the |
@jeremydvoss can you open a new issue with the repro? |
I'm running python3 following the steps on https://github.com/open-telemetry/opentelemetry-python/tree/main/docs/examples/auto-instrumentation and when I get to the auto-instrumentation part it says to run the following command:
$ opentelemetry-instrument --trace-exporter console_span python server_uninstrumented.py
and i get the following returned:
(auto_instrumentation) seanguillen@MacBook-Pro-3 auto-instrumentation % opentelemetry-instrument --trace-exporter console_span python server_uninstrumented.py
usage: opentelemetry-instrument [-h] [--attribute_count_limit ATTRIBUTE_COUNT_LIMIT]
[--attribute_value_length_limit ATTRIBUTE_VALUE_LENGTH_LIMIT] [--bsp_export_timeout BSP_EXPORT_TIMEOUT]
[--bsp_max_export_batch_size BSP_MAX_EXPORT_BATCH_SIZE] [--bsp_max_queue_size BSP_MAX_QUEUE_SIZE]
[--bsp_schedule_delay BSP_SCHEDULE_DELAY] [--event_attribute_count_limit EVENT_ATTRIBUTE_COUNT_LIMIT]
[--exporter_jaeger_agent_host EXPORTER_JAEGER_AGENT_HOST]
[--exporter_jaeger_agent_port EXPORTER_JAEGER_AGENT_PORT]
[--exporter_jaeger_agent_split_oversized_batches EXPORTER_JAEGER_AGENT_SPLIT_OVERSIZED_BATCHES]
[--exporter_jaeger_certificate EXPORTER_JAEGER_CERTIFICATE]
[--exporter_jaeger_endpoint EXPORTER_JAEGER_ENDPOINT]
[--exporter_jaeger_password EXPORTER_JAEGER_PASSWORD]
[--exporter_jaeger_timeout EXPORTER_JAEGER_TIMEOUT] [--exporter_jaeger_user EXPORTER_JAEGER_USER]
[--exporter_otlp_certificate EXPORTER_OTLP_CERTIFICATE]
[--exporter_otlp_compression EXPORTER_OTLP_COMPRESSION]
[--exporter_otlp_endpoint EXPORTER_OTLP_ENDPOINT] [--exporter_otlp_headers EXPORTER_OTLP_HEADERS]
[--exporter_otlp_protocol EXPORTER_OTLP_PROTOCOL] [--exporter_otlp_timeout EXPORTER_OTLP_TIMEOUT]
[--exporter_otlp_traces_certificate EXPORTER_OTLP_TRACES_CERTIFICATE]
[--exporter_otlp_traces_compression EXPORTER_OTLP_TRACES_COMPRESSION]
[--exporter_otlp_traces_endpoint EXPORTER_OTLP_TRACES_ENDPOINT]
[--exporter_otlp_traces_headers EXPORTER_OTLP_TRACES_HEADERS]
[--exporter_otlp_traces_protocol EXPORTER_OTLP_TRACES_PROTOCOL]
[--exporter_otlp_traces_timeout EXPORTER_OTLP_TRACES_TIMEOUT]
[--exporter_zipkin_endpoint EXPORTER_ZIPKIN_ENDPOINT]
[--exporter_zipkin_timeout EXPORTER_ZIPKIN_TIMEOUT]
[--link_attribute_count_limit LINK_ATTRIBUTE_COUNT_LIMIT] [--log_level LOG_LEVEL]
[--resource_attributes RESOURCE_ATTRIBUTES] [--service_name SERVICE_NAME]
[--span_attribute_count_limit SPAN_ATTRIBUTE_COUNT_LIMIT]
[--span_attribute_value_length_limit SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT]
[--span_event_count_limit SPAN_EVENT_COUNT_LIMIT] [--span_link_count_limit SPAN_LINK_COUNT_LIMIT]
[--traces_sampler TRACES_SAMPLER] [--traces_sampler_arg TRACES_SAMPLER_ARG]
[--disabled_instrumentations DISABLED_INSTRUMENTATIONS] [--propagators PROPAGATORS] [--context CONTEXT]
[--id_generator ID_GENERATOR] [--tracer_provider TRACER_PROVIDER] [--traces_exporter TRACES_EXPORTER]
command ...
opentelemetry-instrument: error: unrecognized arguments: --trace-exporter
I can't find any information on how to resolve this. Any input would help.
The text was updated successfully, but these errors were encountered: