-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
help request: Unable to connect to OpenTelemetry #11969
Labels
Comments
Hi @masaya87266, your code snippet indicates that you haven't enabled the OpenTelemetry plugin in the config.yaml file. Please follow the instructions at https://docs.api7.ai/hub/opentelemetry#enable-opentelemetry-plugin and review your configurations. If it still doesn't work, please share the complete content of your config.yaml file. |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
apisix config.yaml:
plugin_attr:
opentelemetry:
resource:
service.name: APISIX
tenant.id: business_id
collector:
address: host.docker.internal:4318
request_timeout: 3
batch_span_processor:
drop_on_queue_full: false
max_queue_size: 6
batch_timeout: 2
inactive_timeout: 1
max_export_batch_size: 2
api:
{
"uris": [
"/test2/api2"
],
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"OPTIONS"
],
"enable_websocket": true,
"upstream": {
"type": "roundrobin",
"nodes": {
"host.docker.internal:9900": 1
},
"scheme": "http"
},
"plugins": {
"opentelemetry": {
"sampler": {
"name": "always_on"
}
}
}
}
apisix log:
2025-02-14 14:10:24 2025/02/14 14:10:24 [error] 53#53: *537 lua entry thread aborted: runtime error: bad argument #1 to '?' (invalid value)
2025-02-14 14:10:24 stack traceback:
2025-02-14 14:10:24 coroutine 0:
2025-02-14 14:10:24 [C]: in function 'gsub'
2025-02-14 14:10:24 ...s/share/lua/5.1/opentelemetry/trace/exporter/encoder.lua:22: in function 'hex2bytes'
2025-02-14 14:10:24 ...s/share/lua/5.1/opentelemetry/trace/exporter/encoder.lua:66: in function 'for_otlp'
2025-02-14 14:10:24 ...deps/share/lua/5.1/opentelemetry/trace/exporter/otlp.lua:102: in function 'export_spans'
2025-02-14 14:10:24 ...are/lua/5.1/opentelemetry/trace/batch_span_processor.lua:45: in function 'process_batches'
2025-02-14 14:10:24 ...are/lua/5.1/opentelemetry/trace/batch_span_processor.lua:77: in function <...are/lua/5.1/opentelemetry/trace/batch_span_processor.lua:57>, context: ngx.timer, client: 172.17.0.1, server: 0.0.0.0:9080
Environment
apisix version
):3.7.0uname -a
):Linux 28634f36056b 5.15.49-linuxkit change: added doc of how to load plugin. #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022 aarch64 GNU/Linux (docker 23.0.5)openresty -V
ornginx -V
):nginx version: openresty/1.21.4.2curl http://127.0.0.1:9090/v1/server_info
):3.5.4luarocks --version
):The text was updated successfully, but these errors were encountered: