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

TraceQL link intrinsic link:traceID and link:spanID #3741

Merged
merged 8 commits into from
Jun 3, 2024

Conversation

stoewer
Copy link
Contributor

@stoewer stoewer commented May 31, 2024

What this PR does:

Add link scope and the intrinsics link:traceID and link:spanID.

Autocomplete is currently not working, but is also part of a separate issue.

Which issue(s) this PR fixes:
Contributes to grafana/tempo-squad#433)

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@stoewer stoewer force-pushed the traceql-additions-link-intrinsics branch from 1de8379 to 18440f2 Compare May 31, 2024 03:30
@stoewer stoewer marked this pull request as ready for review May 31, 2024 04:32
@knylander-grafana
Copy link
Contributor

Will we need doc for this?

@@ -781,10 +785,13 @@ func checkConditions(conditions []traceql.Condition) error {
}

// Check for conditions that are not supported in vParquet2
if cond.Attribute.Intrinsic == traceql.IntrinsicEventName {
if cond.Attribute.Intrinsic == traceql.IntrinsicEventName ||
Copy link
Contributor

Choose a reason for hiding this comment

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

At some point I would like to swap checkConditions to look for supported things, instead of unsupported things. Which is less brittle going forward.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, it would be safer to check what is supported. I've made a note for myself to refactor this in a separate PR

@@ -1458,43 +1505,59 @@ func createAllIterator(ctx context.Context, primaryIter parquetquery.Iterator, c
var (
// If there are only span conditions, then don't return a span upstream
// unless it matches at least 1 span-level condition.
spanRequireAtLeastOneMatch = len(spanConditions) > 0 && len(resourceConditions) == 0 && len(traceConditions) == 0
spanRequireAtLeastOneMatch = len(catConditions.span) > 0 && len(catConditions.resource) == 0 && len(catConditions.trace) == 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Just fyi that these are removed in: #3734

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the heads up. I've resolved the conflicts 👍

@stoewer
Copy link
Contributor Author

stoewer commented Jun 3, 2024

Will we need doc for this?

Yes, we should have documentation for all TraceQL extensions. I added a documentation sub-task to the TraceQL additions epic

@stoewer stoewer merged commit 62cab02 into grafana:main Jun 3, 2024
14 checks passed
@stoewer stoewer deleted the traceql-additions-link-intrinsics branch June 3, 2024 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants