Skip to content

feat(bottlecap): support service mapping and peer.service tag#455

Merged
duncanista merged 26 commits intojordan.gonzalez/bottlecap/universal-instrumentationfrom
jordan.gonzalez/bottlecap/service-mapping
Nov 15, 2024
Merged

feat(bottlecap): support service mapping and peer.service tag#455
duncanista merged 26 commits intojordan.gonzalez/bottlecap/universal-instrumentationfrom
jordan.gonzalez/bottlecap/service-mapping

Conversation

@duncanista
Copy link
Copy Markdown
Contributor

What?

Supports DD_SERVICE_MAPPING as explained in our public documentation.

Also added peer.service tags.

How?

Created an interface to resolve service name, its easier to read than following a builder pattern. Which is cleaner, but less readable.

…to jordan.gonzalez/bottlecap/cold-start-span
…to jordan.gonzalez/bottlecap/cold-start-span
also add a method to reset processor invocation state
…to jordan.gonzalez/bottlecap/service-mapping
@duncanista duncanista requested a review from a team as a code owner November 15, 2024 02:57
@duncanista duncanista changed the base branch from main to jordan.gonzalez/bottlecap/universal-instrumentation November 15, 2024 02:57
Copy link
Copy Markdown
Contributor

@alexgallotta alexgallotta left a comment

Choose a reason for hiding this comment

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

It looks good! Not sure what'st the purpose of ServiceNameResolver though, it could have been all methods.
Also, instead of wrapping extra structs and not really using polymorphism, the span_inferrer can be in the same module of the trigger and avoid having a lot of public modules

@duncanista duncanista merged commit 0b851a6 into jordan.gonzalez/bottlecap/universal-instrumentation Nov 15, 2024
@duncanista duncanista deleted the jordan.gonzalez/bottlecap/service-mapping branch November 15, 2024 17:48
duncanista added a commit that referenced this pull request Nov 15, 2024
* add some helper functions to `invocation::lifecycle` mod

* create cold start span on processor

* move `generate_span_id` to father module

* send `platform_init_start` data to processor

* send `PlatformInitStart` to main bus

* update cold start `parent_id`

* fix start time of cold start span

* enhanced metrics now have a `dynamic_value_tags` for tags which we have to calculate at points in time

* `AwsConfig` now has a `sandbox_init_time` value

* add `is_empty` to `ContextBuffer`

* calculate init tags on invoke

also add a method to reset processor invocation state

* restart init tags on set

* set tags properly for proactive init

* fix unit test

* remove debug line

* make sure `cold_start` tag is only set in one place

* add service mapping config serializer

* add `service_mapping.rs`

* add `ServiceNameResolver` interface

for service mapping

* implement interface in every trigger

* send `service_mapping` lookup table to span enricher

* create `SpanInferrer` with `service_mapping` config

* fmt
duncanista added a commit that referenced this pull request Nov 19, 2024
* add some helper functions to `invocation::lifecycle` mod

* create cold start span on processor

* move `generate_span_id` to father module

* send `platform_init_start` data to processor

* send `PlatformInitStart` to main bus

* update cold start `parent_id`

* fix start time of cold start span

* enhanced metrics now have a `dynamic_value_tags` for tags which we have to calculate at points in time

* `AwsConfig` now has a `sandbox_init_time` value

* add `is_empty` to `ContextBuffer`

* calculate init tags on invoke

also add a method to reset processor invocation state

* restart init tags on set

* set tags properly for proactive init

* fix unit test

* remove debug line

* make sure `cold_start` tag is only set in one place

* add service mapping config serializer

* add `service_mapping.rs`

* add `ServiceNameResolver` interface

for service mapping

* implement interface in every trigger

* send `service_mapping` lookup table to span enricher

* create `SpanInferrer` with `service_mapping` config

* fmt
duncanpharvey pushed a commit that referenced this pull request Mar 10, 2026
* add some helper functions to `invocation::lifecycle` mod

* create cold start span on processor

* move `generate_span_id` to father module

* send `platform_init_start` data to processor

* send `PlatformInitStart` to main bus

* update cold start `parent_id`

* fix start time of cold start span

* enhanced metrics now have a `dynamic_value_tags` for tags which we have to calculate at points in time

* `AwsConfig` now has a `sandbox_init_time` value

* add `is_empty` to `ContextBuffer`

* calculate init tags on invoke

also add a method to reset processor invocation state

* restart init tags on set

* set tags properly for proactive init

* fix unit test

* remove debug line

* make sure `cold_start` tag is only set in one place

* add service mapping config serializer

* add `service_mapping.rs`

* add `ServiceNameResolver` interface

for service mapping

* implement interface in every trigger

* send `service_mapping` lookup table to span enricher

* create `SpanInferrer` with `service_mapping` config

* fmt
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.

2 participants