feat(bottlecap): allow wrapped inferred spans + add SNS-SQS inferred spans#440
Merged
duncanista merged 46 commits intojordan.gonzalez/bottlecap/universal-instrumentationfrom Nov 8, 2024
Conversation
…extension into aj/sns-sqs
…extension into aj/sns-sqs
…extension into aj/sns-sqs
or else theres nothing to extract, reset values also for next inferr, no need to keep state after we complete
and also move some variables
…to jordan.gonzalez/bottlecap/sns
also update path
alexgallotta
approved these changes
Nov 8, 2024
Base automatically changed from
jordan.gonzalez/bottlecap/sns
to
jordan.gonzalez/bottlecap/universal-instrumentation
November 8, 2024 20:13
…to jordan.gonzalez/bottlecap/sns-sqs
1c17830
into
jordan.gonzalez/bottlecap/universal-instrumentation
duncanista
added a commit
that referenced
this pull request
Nov 15, 2024
…spans (#440) * wip: sqs * feat: sqs tests * invert duration check * remove duration set * fmt and add `test_get_arn` * remove unneeded reference * remove unneeded comments * add `get_carrier` implementation for `SqsRecord` * add trace context to `sqs_event.json` * fix: resource_names is not needed * fix: don't deserialize body * avoid `use super::...` * fix unit tests * set carrier and trigger tags * remove duplicate tag * fmt * pass headers to `on_invocation_end` * infer first, then extract or else theres nothing to extract, reset values also for next inferr, no need to keep state after we complete * reset values on every infer * add `sns_event.rs` * add `sns_event*.json` payloads * add `base64_to_string` method and also move some variables * surrender resource * use `SnsRecord` for inferred spans * move some constants * add missing trigger tags * missed one case * update unit tests * update `tt` to `t.get_tags()` * fmt * typo * update tags * SQS event can contain SNS carrier * make some `Trigger` methods to be `Sized` * add `sns_sqs_event.json` also update path * account for wrapped inferred span in processor * simplify code in `span_inferrer.rs` * remove duplicated condition --------- Co-authored-by: AJ Stuyvenberg <astuyve@gmail.com>
duncanista
added a commit
that referenced
this pull request
Nov 19, 2024
…spans (#440) * wip: sqs * feat: sqs tests * invert duration check * remove duration set * fmt and add `test_get_arn` * remove unneeded reference * remove unneeded comments * add `get_carrier` implementation for `SqsRecord` * add trace context to `sqs_event.json` * fix: resource_names is not needed * fix: don't deserialize body * avoid `use super::...` * fix unit tests * set carrier and trigger tags * remove duplicate tag * fmt * pass headers to `on_invocation_end` * infer first, then extract or else theres nothing to extract, reset values also for next inferr, no need to keep state after we complete * reset values on every infer * add `sns_event.rs` * add `sns_event*.json` payloads * add `base64_to_string` method and also move some variables * surrender resource * use `SnsRecord` for inferred spans * move some constants * add missing trigger tags * missed one case * update unit tests * update `tt` to `t.get_tags()` * fmt * typo * update tags * SQS event can contain SNS carrier * make some `Trigger` methods to be `Sized` * add `sns_sqs_event.json` also update path * account for wrapped inferred span in processor * simplify code in `span_inferrer.rs` * remove duplicated condition --------- Co-authored-by: AJ Stuyvenberg <astuyve@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Support SNS-SQS inferred spans

How?
Simplified the logic since we are introducing another span to be added.
Created the carrier for SNS inside the SQS
get_carriertrigger. Its simpler logic-wise. Although we pay a small cost of double parsing the same wrapped event (see thesqs_event.rstrigger and thespan_inferrer.rsforSqsRecord).Notes
Moved some logic so we can have a
wrapped_inferred_spanwhich should only appear in certain spaces.Not making it an array, since we are not going to do more than 1 hop.