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

feat: include additional metadata for tracing the collaboration service #9684

Merged
merged 5 commits into from
Aug 13, 2024

Conversation

jvillafanez
Copy link
Member

@jvillafanez jvillafanez commented Jul 24, 2024

Description

Improve tracing of the collaboration service. This includes:

  • Content data upload and download through the WOPI server will be traced. Upload and download times are shown now.
  • Some file and user metadata included in the collaboration span. This can help to filter traces by user or by file. It might be useful if users come from different idps, or files are stored in multiple places
  • Included the request method in the span name.

It might be better if the X-WOPI-Override header was part of the span name, but it seems we'd need to replace the otelchi middleware with our custom version. For now, the header is included as span attribute.

Screenshot from 2024-07-24 18-15-19

Screenshot from 2024-07-24 18-31-40

Related Issue

no open issue

Motivation and Context

This should reflect better how much time is spent in other services, specially since the upload and download times weren't being shown before.

How Has This Been Tested?

Manually checked with a jaeger instance.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Additional things to consider

  • Tracing middleware might be merged with the wopiContext one. This could improve the performance because with this PR we need to get the wopiContext several times per requests. However, this could be confusing in the long run because the resulting middleware would do multiple things.
  • Including the X-WOPI-Override header in the span name might be ideal. However, there is no good way to do it.
    • We can set a new name, but we can't get the current name. In order to set the name we want, we'd need to copy the otelchi code in our tracing code (at least the relevant part in order to get the name), so we'd do the same thing twice adding more overhead to every request.
    • We can replace the otelchi implementation with a custom one. However, the setup is kind of standard in ocis. Using a custom implementation in a specific service might be confusing.
  • I don't think there isn't any other useful information that could be added in the span attributes

@jvillafanez jvillafanez self-assigned this Jul 24, 2024
Copy link

update-docs bot commented Jul 24, 2024

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@jvillafanez jvillafanez force-pushed the collaboration_improved_tracing branch 2 times, most recently from 993afe2 to 9e0cdaa Compare July 25, 2024 13:34
@jvillafanez jvillafanez marked this pull request as ready for review July 29, 2024 11:13
@jvillafanez jvillafanez force-pushed the collaboration_improved_tracing branch from 9e0cdaa to 083a2e1 Compare August 5, 2024 11:15
@micbar micbar requested review from butonic and kobergj August 6, 2024 09:02
Copy link

@jvillafanez jvillafanez merged commit faf1627 into master Aug 13, 2024
4 checks passed
@jvillafanez jvillafanez deleted the collaboration_improved_tracing branch August 13, 2024 09:35
Copy link
Member

@butonic butonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

ownclouders pushed a commit that referenced this pull request Aug 13, 2024
feat: include additional metadata for tracing the collaboration service
@ScharfViktor ScharfViktor mentioned this pull request Aug 20, 2024
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants