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

support circular reference of protobuf #19915

Open
fuyufjh opened this issue Dec 24, 2024 · 3 comments · May be fixed by #19935
Open

support circular reference of protobuf #19915

fuyufjh opened this issue Dec 24, 2024 · 3 comments · May be fixed by #19935
Assignees
Milestone

Comments

@fuyufjh
Copy link
Member

fuyufjh commented Dec 24, 2024

Is your feature request related to a problem? Please describe.

This proto is not supported due to circular reference.

https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/common/v1/common.proto

[2024-12-18 17:12:48] 3: circular reference detected: resource_metrics(opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resource_metrics)->resource(opentelemetry.proto.metrics.v1.ResourceMetrics.resource)->attributes(opentelemetry.proto.resource.v1.Resource.attributes)->value(opentelemetry.proto.common.v1.KeyValue.value)->array_value(opentelemetry.proto.common.v1.AnyValue.array_value)->values(opentelemetry.proto.common.v1.ArrayValue.values), conflict with array_value(opentelemetry.proto.common.v1.AnyValue.array_value), kind opentelemetry.proto.common.v1.ArrayValue

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

@fuyufjh
Copy link
Member Author

fuyufjh commented Dec 24, 2024

For this particular case, shall we handle this AnyValue in the same way of #12291 ?

@tabVersion
Copy link
Contributor

For this particular case, shall we handle this AnyValue in the same way of #12291 ?

Yes, @xiangjinwu and I have a solution on it.

@xiangjinwu
Copy link
Contributor

For this particular case, shall we handle this AnyValue in the same way of #12291 ?

  • This AnyValue is closer to Value (unsupported yet) rather than Any (#18380 supersedes #12291)
  • It is a coincidence that we can support both Any and Value (thus AnyValue here) leveraging protobuf's canonical JSON encoding.

@tabVersion tabVersion linked a pull request Dec 25, 2024 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants