Skip to content

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

Merged
stoewer merged 8 commits intografana:mainfrom
stoewer:traceql-additions-link-intrinsics
Jun 3, 2024
Merged

TraceQL link intrinsic link:traceID and link:spanID#3741
stoewer merged 8 commits intografana:mainfrom
stoewer:traceql-additions-link-intrinsics

Conversation

@stoewer
Copy link
Copy Markdown
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
Copy Markdown
Contributor

Will we need doc for this?


// Check for conditions that are not supported in vParquet2
if cond.Attribute.Intrinsic == traceql.IntrinsicEventName {
if cond.Attribute.Intrinsic == traceql.IntrinsicEventName ||
Copy link
Copy Markdown
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
Copy Markdown
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

// 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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

None yet

Development

Successfully merging this pull request may close these issues.

4 participants