You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/10/13 09:17:52 UTC

[GitHub] [apisix] ZhangShangyu opened a new issue, #8084: feat: opentelemetry plugin set http status code to span tag by default

ZhangShangyu opened a new issue, #8084:
URL: https://github.com/apache/apisix/issues/8084

   ### Description
   
   the opentelemetry plugin now set http status code to span tag only when upstream response status is greater equals than 500.
   <img width="737" alt="image" src="https://user-images.githubusercontent.com/15957047/195556460-620ea171-2adf-436a-a8d9-8ea94bdd936e.png">
   
   can set http status code to span tag by default instead of only when upstream greater equals than 500?
   to solve these cases:
   * can filter trace by http code tag conveniently
   * some plugin like limit-count will not have stream response status, if rate limit return 503, then also can show the 503 tag in span


-- 
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] feat: opentelemetry plugin can set http status code to span tag by default [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8084:
URL: https://github.com/apache/apisix/issues/8084#issuecomment-1770487431

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
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


[GitHub] [apisix] tokers commented on issue #8084: feat: opentelemetry plugin set http status code to span tag by default

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #8084:
URL: https://github.com/apache/apisix/issues/8084#issuecomment-1277305745

   Or this can be a flag?


-- 
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] feat: opentelemetry plugin can set http status code to span tag by default [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8084:
URL: https://github.com/apache/apisix/issues/8084#issuecomment-1746550132

   This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
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


[GitHub] [apisix] spacewander commented on issue #8084: feat: opentelemetry plugin can set http status code to span tag by default

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #8084:
URL: https://github.com/apache/apisix/issues/8084#issuecomment-1277339217

   > 2022/10/13 08:02:47 [error] 133#133: *402129 lua entry thread aborted: runtime error: ...deps/share/lua/5.1/opentelemetry/trace/exporter/otlp.lua:67: bad argument #2 to 'encode' (string expected for field 'string_value', got number)
   
   We need to ensure the value has string type.
   
   @soulbird 
   Would you give it a try?


-- 
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


[GitHub] [apisix] soulbird commented on issue #8084: feat: opentelemetry plugin can set http status code to span tag by default

Posted by GitBox <gi...@apache.org>.
soulbird commented on issue #8084:
URL: https://github.com/apache/apisix/issues/8084#issuecomment-1283367766

   Not yet. Maybe we can make some adjustments to support adding some response-related attributes to spans. cc @bzp2010 


-- 
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] feat: opentelemetry plugin can set http status code to span tag by default [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #8084: feat: opentelemetry plugin can set http status code to span tag by default
URL: https://github.com/apache/apisix/issues/8084


-- 
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


[GitHub] [apisix] ZhangShangyu commented on issue #8084: feat: opentelemetry plugin can set http status code to span tag by default

Posted by GitBox <gi...@apache.org>.
ZhangShangyu commented on issue #8084:
URL: https://github.com/apache/apisix/issues/8084#issuecomment-1280222113

   thanks


-- 
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


[GitHub] [apisix] ZhangShangyu commented on issue #8084: feat: opentelemetry plugin set http status code to span tag by default

Posted by GitBox <gi...@apache.org>.
ZhangShangyu commented on issue #8084:
URL: https://github.com/apache/apisix/issues/8084#issuecomment-1277312440

   i try to add status in additional_attributes config, but there is an error happened
   
   apisix.yaml:
   ```
   opentelemetry:
       sampler:
         name: always_on
       additional_attributes:
         - route_id
         - status
   ```
   
   apisix error log:
   ```
   2022/10/13 08:02:47 [error] 133#133: *402129 lua entry thread aborted: runtime error: ...deps/share/lua/5.1/opentelemetry/trace/exporter/otlp.lua:67: bad argument #2 to 'encode' (string expected for field 'string_value', got number)
   stack traceback:
   coroutine 0:
   	[C]: in function 'encode'
   	...deps/share/lua/5.1/opentelemetry/trace/exporter/otlp.lua:67: in function 'export_spans'
   	...are/lua/5.1/opentelemetry/trace/batch_span_processor.lua:18: in function 'process_batches'
   	...are/lua/5.1/opentelemetry/trace/batch_span_processor.lua:46: in function <...are/lua/5.1/opentelemetry/trace/batch_span_processor.lua:29>, context: ngx.timer, client: 172.17.0.1, server: 0.0.0.0:24221
   ```
   
   apisix version: 2.13.2


-- 
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


[GitHub] [apisix] soulbird commented on issue #8084: feat: opentelemetry plugin can set http status code to span tag by default

Posted by GitBox <gi...@apache.org>.
soulbird commented on issue #8084:
URL: https://github.com/apache/apisix/issues/8084#issuecomment-1277839456

   `status` is of type number, not string.
   In addition, the variables in the `additional_attributes` configuration are parsed during the `rewrite phase`, so configuring "status" here will not get the result you want, because APISIX has not received a response yet.


-- 
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