You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "jonathan-dev (via GitHub)" <gi...@apache.org> on 2023/10/24 13:16:42 UTC
[I] bug: Trouble with opentelemetry plugin [apisix]
jonathan-dev opened a new issue, #10389:
URL: https://github.com/apache/apisix/issues/10389
### Current Behavior
I am running the image `apache/apisix:3.6.0-debian` with almost standard settings for the opentelemtry plugin:
```
plugin_attr:
opentelemetry:
resource:
service.name: APISIX
tenant.id: business_id
collector:
address: otel-collector:4318
request_timeout: 3
request_headers:
foo: bar
batch_span_processor:
drop_on_queue_full: false
max_queue_size: 6
batch_timeout: 2
inactive_timeout: 1
max_export_batch_size: 2
```
plugin section for route:
```
"plugins": {
"opentelemetry": {
"disable": false,
"sampler": {
"name": "always_on"
}
},
```
looking at the apisix logs I get the following error:
```
2023/10/24 10:32:00 [error] 60#60: *1448554 lua entry thread aborted: runtime error: bad argument #1 to '?' (invalid value)
stack traceback:
coroutine 0:
[C]: in function 'gsub'
...s/share/lua/5.1/opentelemetry/trace/exporter/encoder.lua:22: in function 'hex2bytes'
...s/share/lua/5.1/opentelemetry/trace/exporter/encoder.lua:66: in function 'for_otlp'
...deps/share/lua/5.1/opentelemetry/trace/exporter/otlp.lua:102: in function 'export_spans'
...are/lua/5.1/opentelemetry/trace/batch_span_processor.lua:45: in function 'process_batches'
...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.18.0.1, server: 0.0.0.0:9443
```
I also failed to get the logging in place that is described [here](https://apisix.apache.org/blog/2023/10/05/release-apache-apisix-3.6.0/#support-the-use-of-nginx-variables-in-opentelemetry-plugin) here I'm not sure If I need to put the http section in the top level or under the `nginx_config: ` (when i put it there I get errors and when its on the root level I get nothing).
### Expected Behavior
no errors
working plugin
### Error Logs
mentioned above
### Steps to Reproduce
startup apisix and send request to route that has the plugin setup
### Environment
determined by the docker image
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: Trouble with opentelemetry plugin [apisix]
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek closed issue #10389: bug: Trouble with opentelemetry plugin
URL: https://github.com/apache/apisix/issues/10389
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: Trouble with opentelemetry plugin [apisix]
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #10389:
URL: https://github.com/apache/apisix/issues/10389#issuecomment-1871013141
according to the specification, the trace_id should be a valid hex and hyphens cannot be a part of it. So I will close this issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: Trouble with opentelemetry plugin [apisix]
Posted by "jonathan-dev (via GitHub)" <gi...@apache.org>.
jonathan-dev commented on issue #10389:
URL: https://github.com/apache/apisix/issues/10389#issuecomment-1779239522
I finally figured out what the problem is:
The default value of `trace_id_source` in the image seems to be `x-request-id` and not `random` like it is stated [here](https://apisix.apache.org/docs/apisix/plugins/opentelemetry/).
I was using the request id [plugin](https://apisix.apache.org/docs/apisix/plugins/request-id/) the the algorithm set to uuid.
And this stack trace was just saying that the [hex2bytes function](https://github.com/yangxikun/opentelemetry-lua/blob/6e44fe8352a032f8a24fffef3c0a43a05ee49e33/lib/opentelemetry/trace/exporter/encoder.lua#L22) has problem dealing this a uuid as input ( the `-` are problmatic)
So either the default value in the image of the documentation for the opentelemetry plugin is wrong.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: Trouble with opentelemetry plugin [apisix]
Posted by "jonathan-dev (via GitHub)" <gi...@apache.org>.
jonathan-dev commented on issue #10389:
URL: https://github.com/apache/apisix/issues/10389#issuecomment-1779301531
related to https://github.com/apache/apisix/pull/10246
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: Trouble with opentelemetry plugin [apisix]
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #10389:
URL: https://github.com/apache/apisix/issues/10389#issuecomment-1778602714
I tried reproducing this issue but didn't find any bugs. Please share how I can reproduce this bug from your side.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org