-
Notifications
You must be signed in to change notification settings - Fork 763
Description
I've been trying to run the basic Open Telemetry "Getting Started" guide, but ran into multiple issues.
I tried running it on a RHEL8 machine (tried fedora and MACOS as well) while using pipenv, and python 3.9.6. I ran the latest version of the library.
I have the following packages installed on the environment:
anyio==3.6.1
asgiref==3.5.2
backoff==2.1.2
certifi==2022.6.15
charset-normalizer==2.1.0
click==8.1.3
Deprecated==1.2.13
fastapi==0.79.0
Flask==2.1.3
googleapis-common-protos==1.56.2
grpcio==1.48.0rc1
h11==0.13.0
httptools==0.4.0
idna==3.3
importlib-metadata==4.12.0
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.1
opentelemetry-api==1.12.0rc2
opentelemetry-distro==0.32b0
opentelemetry-exporter-jaeger==1.12.0rc2
opentelemetry-exporter-jaeger-proto-grpc==1.12.0rc2
opentelemetry-exporter-jaeger-thrift==1.12.0rc2
opentelemetry-exporter-otlp-proto-grpc==1.12.0rc2
opentelemetry-instrumentation==0.32b0
opentelemetry-instrumentation-asgi==0.32b0
opentelemetry-instrumentation-fastapi==0.32b0
opentelemetry-instrumentation-requests==0.32b0
opentelemetry-proto==1.12.0rc2
opentelemetry-sdk==1.12.0rc2
opentelemetry-semantic-conventions==0.32b0
opentelemetry-util-http==0.32b0
protobuf==3.20.1
pydantic==1.9.1
python-dotenv==0.20.0
PyYAML==6.0
requests==2.28.1
six==1.16.0
sniffio==1.2.0
starlette==0.19.1
thrift==0.16.0
typing_extensions==4.3.0
urllib3==1.26.11
uvicorn==0.18.2
uvloop==0.16.0
watchfiles==0.16.0
websockets==10.3
Werkzeug==2.2.0
wrapt==1.14.1
zipp==3.8.1
Steps to reproduce
Same exact example as in the getting started guide (including all the dependencies and the bootstrap). I'm running the flask app (which is working fine) with the automated telemetry, and exporting the traces to a Jaeger instance (using docker and the all-in-one command presented).
only difference is, the docs refer to this import: from opentelemetry.exporter.jaeger import JaegerExporter which does not exist and can't be imported. instead, I'm using thrift (tried grpc as well, encountered the same issues).
code example for setting up the exporter:
from opentelemetry.exporter.jaeger.thrift import JaegerExporter
from opentelemetry.sdk.resources import SERVICE_NAME, Resource
from collections import Counter
from typing import Mapping
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from flask import Flask, request
app = Flask(__name__)
counter = Counter()
# thrift:
resource = Resource(attributes={
SERVICE_NAME: "counter"
})
jaeger_exporter = JaegerExporter(
agent_host_name="localhost",
agent_port=6831,
)
provider = TracerProvider(resource=resource)
processor = BatchSpanProcessor(jaeger_exporter)
provider.add_span_processor(processor)
trace.set_tracer_provider(provider)
command that I use:
opentelemetry-instrument --traces_exporter jaeger --metrics_exporter console --logs_exporter console flask run
What is the expected behavior?
The traces in the Jaeger instance, under a service called "counter".
What is the actual behavior?
While the traces can be exported to console (when set to export to console), there is no trace of them in the Jaeger instance, there is only jaeger-query service available. Instead, I'm getting the following error:
Failed to export batch. Status code: StatusCode.UNAVAILABLE
E0725 17:39:22.176535710 320299 ssl_transport_security.cc:1495] Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.
as well as:
Overriding of current TracerProvider is not allowed
This does not happen when exporting to the console.