英文:
Kubernetes error: unknown field "otel" error when trying to setup Open Telemetry with Dapr
问题
I'm following the Dapr documentation to have Dapr sending data to an Open Telemetry collector pod in Kubernetes. The first step is to configure Dapr to send distributed tracing data.
So I'm trying to add the following yaml file to Kubernetes:
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: tracing
spec:
tracing:
samplingRate: "1"
otel:
endpointAddress: "localhost:4317"
isSecure: false
protocol: grpc
Using the command: kubectl apply -f .\tracing-config.yaml
Problem is that I'm getting the following error:
error: error validating ".\zeta\components\tracing-config.yaml": error validating data: ValidationError(Configuration.spec.tracing): unknown field "otel" in io.dapr.v1alpha1.Configuration.spec.tracing; if you choose to ignore these errors, turn validation off with --validate=false
Even if I try to use kubectl apply -f .\tracing-config.yaml --validate=false
, what happens is that the field "otel" and its subfields are ignored when applied.
Since that yaml exists in Dapr's official documentation, I imagine this should be doable. Is there a way to add a field even if it is not recognized? Or some other workaround for this?
英文:
I'm following the Dapr documentation to have Dapr sending data to an Open Telemetry collector pod in kubernetes.
The first step is to configure Dapr to send distributed tracing data.
Tracing Docs
So I'm trying to add the following yaml file to kubernetes:
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: tracing
spec:
tracing:
samplingRate: "1"
otel:
endpointAddress: "localhost:4317"
isSecure: false
protocol: grpc
Using the command: kubectl apply -f .\tracing-config.yaml
Problem is that I'm getting the following error:
> error: error validating ".\zeta\components\tracing-config.yaml": error validating data: ValidationError(Configuration.spec.tracing): unknown field "otel" in io.dapr.v1alpha1.Configuration.spec.tracing; if you choose to ignore these errors, turn validation off with --validate=false
Even if I try to use kubectl apply -f .\tracing-config.yaml --validate=false
, what happens is that the field "otel" and it's subfields are ignored when applied.
Since that yaml exists in Dapr's official documentation, I imagine this should be doable. Is there a way to add a field even if it is not recognized? Or some other workaround for this?
答案1
得分: 1
如Juliano Costa所提到的,事实上,我已经更新了dapr sidecars,但没有更新dapr本身,而我使用的版本不支持"otel"字段。将其更新到版本1.10解决了这个问题。
英文:
As Juliano Costa mentioned, in fact, I had the dapr sidecars updated, but not dapr it self and the version I was using did not support the "otel" field. Updating it to the version 1.10 fixed it.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论