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

google-cloud-trace does not work with rails 7 #17988

Closed
shouichi opened this issue Apr 7, 2022 · 0 comments · Fixed by #17989
Closed

google-cloud-trace does not work with rails 7 #17988

shouichi opened this issue Apr 7, 2022 · 0 comments · Fixed by #17989
Labels
api: cloudtrace Issues related to the Cloud Trace API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@shouichi
Copy link
Contributor

shouichi commented Apr 7, 2022

Environment details

  • OS: linux
  • Ruby version: 3.1.1
  • Gem name and version: 0.41.3

Steps to reproduce

  1. gem install rails
  2. configure google-cloud-trace
  3. send requests to rails server

grpc log shows that the library sends invalid traces.

D, [2022-04-07T06:00:42.994247 #1] DEBUG -- : calling cloudtrace.googleapis.com:/google.devtools.cloudtrace.v1.TraceService/PatchTraces
D, [2022-04-07T06:00:43.182028 #1] DEBUG -- : Failing with status #<struct Struct::Status code=3, details="Invalid timestamp: 54234-08-05 10:32:55.794433593 +0000 UTC", metadata={}, debug_error_string="{\"created\":\"@1649311243.181814787\",\"description\":\"Error received from peer ipv4:173.194.202.95:443\",\"file\":\"src/core/lib/surface/call.cc\",\"file_line\":1063,\"grpc_message\":\"Invalid timestamp: 54234-08-05 10:32:55.794433593 +0000 UTC\",\"grpc_status\":3}">

It seems that rails 7 introduced a braking change of ActiveSupport::Notifications::Event. Particularly, time from active support events are unix timestamp in millisecond, but google-cloud-trace assumes seconds.

Thanks.

Code example

N/A.

Full backtrace

N/A.

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 7, 2022
@dazuma dazuma added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. api: cloudtrace Issues related to the Cloud Trace API. and removed triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudtrace Issues related to the Cloud Trace API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants