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 zipkin exporter conflicted with py_zipkin #29306

Closed
darinyu opened this issue Nov 16, 2023 · 2 comments
Closed

opentelemetry zipkin exporter conflicted with py_zipkin #29306

darinyu opened this issue Nov 16, 2023 · 2 comments
Labels
bug Something isn't working exporter/zipkin needs triage New item requiring triage

Comments

@darinyu
Copy link

darinyu commented Nov 16, 2023

Component(s)

No response

What happened?

Description

opentelemetry zipkin exporter conflicted with py_zipkin. Hence all the libraries depending on py_zipkin have the risk of being incompatible with Opentelemetry.

Steps to Reproduce

pip install pipdeptree opentelemetry-exporter-zipkin py-zipkin
python -c 'from opentelemetry.exporter.zipkin.proto.http import ZipkinExporter; from py_zipkin.zipkin import zipkin_span'

Expected Result

Both library should be compatible.

Actual Result

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/root/miniforge3/envs/test_proto/lib/python3.7/site-packages/py_zipkin/__init__.py", line 2, in <module>
    from py_zipkin.encoding._types import Encoding  # noqa
  File "/root/miniforge3/envs/test_proto/lib/python3.7/site-packages/py_zipkin/encoding/__init__.py", line 6, in <module>
    from py_zipkin.encoding._encoders import get_encoder  # noqa: F401
  File "/root/miniforge3/envs/test_proto/lib/python3.7/site-packages/py_zipkin/encoding/_encoders.py", line 10, in <module>
    from py_zipkin.encoding import protobuf
  File "/root/miniforge3/envs/test_proto/lib/python3.7/site-packages/py_zipkin/encoding/protobuf/__init__.py", line 16, in <module>
    from py_zipkin.encoding.protobuf import zipkin_pb2
  File "/root/miniforge3/envs/test_proto/lib/python3.7/site-packages/py_zipkin/encoding/protobuf/zipkin_pb2.py", line 17, in <module>
    DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(py_zipkin/encoding/protobuf/zipkin.proto\x12\rzipkin.proto3\"\xf5\x03\n\x04Span\x12\x10\n\x08trace_id\x18\x01 \x01(\x0c\x12\x11\n\tparent_id\x18\x02 \x01(\x0c\x12\n\n\x02id\x18\x03 \x01(\x0c\x12&\n\x04kind\x18\x04 \x01(\x0e\x32\x18.zipkin.proto3.Span.Kind\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x11\n\ttimestamp\x18\x06 \x01(\x06\x12\x10\n\x08\x64uration\x18\x07 \x01(\x04\x12/\n\x0elocal_endpoint\x18\x08 \x01(\x0b\x32\x17.zipkin.proto3.Endpoint\x12\x30\n\x0fremote_endpoint\x18\t \x01(\x0b\x32\x17.zipkin.proto3.Endpoint\x12.\n\x0b\x61nnotations\x18\n \x03(\x0b\x32\x19.zipkin.proto3.Annotation\x12+\n\x04tags\x18\x0b \x03(\x0b\x32\x1d.zipkin.proto3.Span.TagsEntry\x12\r\n\x05\x64\x65\x62ug\x18\x0c \x01(\x08\x12\x0e\n\x06shared\x18\r \x01(\x08\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"U\n\x04Kind\x12\x19\n\x15SPAN_KIND_UNSPECIFIED\x10\x00\x12\n\n\x06\x43LIENT\x10\x01\x12\n\n\x06SERVER\x10\x02\x12\x0c\n\x08PRODUCER\x10\x03\x12\x0c\n\x08\x43ONSUMER\x10\x04\"J\n\x08\x45ndpoint\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12\x0c\n\x04ipv4\x18\x02 \x01(\x0c\x12\x0c\n\x04ipv6\x18\x03 \x01(\x0c\x12\x0c\n\x04port\x18\x04 \x01(\x05\".\n\nAnnotation\x12\x11\n\ttimestamp\x18\x01 \x01(\x06\x12\r\n\x05value\x18\x02 \x01(\t\"1\n\x0bListOfSpans\x12\"\n\x05spans\x18\x01 \x03(\x0b\x32\x13.zipkin.proto3.Span\"\x10\n\x0eReportResponse2T\n\x0bSpanService\x12\x45\n\x06Report\x12\x1a.zipkin.proto3.ListOfSpans\x1a\x1d.zipkin.proto3.ReportResponse\"\x00\x42\x12\n\x0ezipkin2.proto3P\x01\x62\x06proto3')
TypeError: Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file "py_zipkin/encoding/protobuf/zipkin.proto":
  zipkin.proto3.Span.trace_id: "zipkin.proto3.Span.trace_id" is already defined in file "zipkin.proto".
  zipkin.proto3.Span.parent_id: "zipkin.proto3.Span.parent_id" is already defined in file "zipkin.proto".
  zipkin.proto3.Span.id: "zipkin.proto3.Span.id" is already defined in file "zipkin.proto".
  zipkin.proto3.Span.kind: "zipkin.proto3.Span.kind" is already defined in file "zipkin.proto".
  zipkin.proto3.Span.name: "zipkin.proto3.Span.name" is already defined in file "zipkin.proto".
  zipkin.proto3.Span.timestamp: "zipkin.proto3.Span.timestamp" is already defined in file "zipkin.proto".
  zipkin.proto3.Span.duration: "zipkin.proto3.Span.duration" is already defined in file "zipkin.proto".
  zipkin.proto3.Span.local_endpoint: "zipkin.proto3.Span.local_endpoint" is already defined in file "zipkin.proto".
  zipkin.proto3.Span.remote_endpoint: "zipkin.proto3.Span.remote_endpoint" is already defined in file "zipkin.proto".
  zipkin.proto3.Span.annotations: "zipkin.proto3.Span.annotations" is already defined in file "zipkin.proto".
  zipkin.proto3.Span.tags: "zipkin.proto3.Span.tags" is already defined in file "zipkin.proto".
  zipkin.proto3.Span.debug: "zipkin.proto3.Span.debug" is already defined in file "zipkin.proto".
  zipkin.proto3.Span.shared: "zipkin.proto3.Span.shared" is already defined in file "zipkin.proto".

Collector version

exporter 1.21.0

Environment information

Environment

OS:
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"

OpenTelemetry Collector configuration

No response

Log output

pipdeptree | grep opentelemetry

opentelemetry-exporter-zipkin==1.21.0
  - opentelemetry-exporter-zipkin-json [required: ==1.21.0, installed: 1.21.0]
    - opentelemetry-api [required: ~=1.3, installed: 1.21.0]
    - opentelemetry-sdk [required: ~=1.11, installed: 1.21.0]
      - opentelemetry-api [required: ==1.21.0, installed: 1.21.0]
      - opentelemetry-semantic-conventions [required: ==0.42b0, installed: 0.42b0]
  - opentelemetry-exporter-zipkin-proto-http [required: ==1.21.0, installed: 1.21.0]
    - opentelemetry-api [required: ~=1.3, installed: 1.21.0]
    - opentelemetry-exporter-zipkin-json [required: ==1.21.0, installed: 1.21.0]
      - opentelemetry-api [required: ~=1.3, installed: 1.21.0]
      - opentelemetry-sdk [required: ~=1.11, installed: 1.21.0]
        - opentelemetry-api [required: ==1.21.0, installed: 1.21.0]
        - opentelemetry-semantic-conventions [required: ==0.42b0, installed: 0.42b0]
    - opentelemetry-sdk [required: ~=1.11, installed: 1.21.0]
      - opentelemetry-api [required: ==1.21.0, installed: 1.21.0]
      - opentelemetry-semantic-conventions [required: ==0.42b0, installed: 0.42b0]


### Additional context

_No response_
@darinyu darinyu added bug Something isn't working needs triage New item requiring triage labels Nov 16, 2023
@crobert-1
Copy link
Member

Hello @darinyu, this is actually an issue with the OpenTelemetry Python library, not the OpenTelemetry Collector. Please feel free to re-open this issue there.

Sorry about that! I realize it's confusing, the concept of exporter is used in multiple places within OpenTelemetry so it can be hard to follow.

@crobert-1 crobert-1 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 20, 2023
@crobert-1
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exporter/zipkin needs triage New item requiring triage
Projects
None yet
Development

No branches or pull requests

2 participants