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

OPIK-58 Add trace usage #332

Merged
merged 2 commits into from
Oct 2, 2024
Merged

Conversation

andrescrz
Copy link
Collaborator

@andrescrz andrescrz commented Oct 2, 2024

Details

Added new usage field on Trace, which is calculated by summing the values of all the spans under the particular trace, per each usage key.

Due to summing, using Long type and summap function in ClickHouse instead of Integer and summapwithoverflow.

Some minor fixes in a few queries and also improved many Trace tests along the way.

Issues

OPIK-58

Testing

  • Added and updated integration tests:
    • Summing usual token values.
    • Mixed with other random keys.
    • Mixed with missing keys.
    • Mixed with null keys.
    • Spans with null values case.
  • Tests for all Trace retrieval endpoints: get by ID and find endpoints.
  • Existing tests already check the case of no spans under the trace, resulting in a null trace usage.

Documentation

@andrescrz andrescrz self-assigned this Oct 2, 2024
@andrescrz andrescrz added the enhancement New feature or request label Oct 2, 2024
@andrescrz andrescrz marked this pull request as ready for review October 2, 2024 09:40
@andrescrz andrescrz requested a review from a team as a code owner October 2, 2024 09:40
@andrescrz andrescrz merged commit faabc51 into main Oct 2, 2024
7 checks passed
@andrescrz andrescrz deleted the andrescrz/OPIK-58-add-trace-usage branch October 2, 2024 11:09
dsblank pushed a commit that referenced this pull request Oct 4, 2024
* OPIK-58 Add trace usage

* Rev2: using trace star for queries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants