Skip to content

Serverless Span Filtering#872

Merged
pvital merged 2 commits into
mainfrom
serverless_span_filtering
May 15, 2026
Merged

Serverless Span Filtering#872
pvital merged 2 commits into
mainfrom
serverless_span_filtering

Conversation

@pvital
Copy link
Copy Markdown
Member

@pvital pvital commented May 11, 2026

This PR adds the Span Filtering feature to the Serverless Agents. It consists of two commits that:

  1. refactor(agent): ServerlessAgent with Span Filter
    Introduce a new ServerlessAgent abstract base class to eliminate code duplication across serverless platforms and add support for the Span Filtering feature.
    This refactoring follows the Template Method pattern, allowing platform-specific customization through abstract methods while maintaining a single source of truth for the common serverless agent behavior.
  2. tests(agent): Update tests for agent refactoring.
    Add and update agent tests to validate the new agent architecture:
  • 890 lines in test_base_agent.py for BaseAgent functionality
  • 447 lines in test_serverless_agent.py for ServerlessAgent base class
  • 217 lines in test_fargate_span_filtering.py for Fargate span filtering
  • Update test_host.py and test_eksfargate.py to align with refactored code
    Ensures all agent implementations maintain correct behavior after the serverless agent consolidation refactoring.

@pvital pvital self-assigned this May 11, 2026
@pvital pvital force-pushed the serverless_span_filtering branch 4 times, most recently from fa40697 to cf2c136 Compare May 11, 2026 21:58
@pvital pvital marked this pull request as ready for review May 11, 2026 22:24
@pvital pvital requested a review from a team as a code owner May 11, 2026 22:24
Copy link
Copy Markdown
Contributor

@CagriYonca CagriYonca left a comment

Choose a reason for hiding this comment

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

I left a few comments but overall new changes seem more structured than before. Great job

Comment thread src/instana/agent/aws_eks_fargate.py Outdated
Comment thread src/instana/agent/aws_fargate.py Outdated
Comment thread src/instana/agent/aws_lambda.py Outdated
Comment thread src/instana/agent/google_cloud_run.py Outdated
Comment thread src/instana/agent/serverless.py
pvital added 2 commits May 14, 2026 11:10
Introduce a new ServerlessAgent abstract base class to eliminate code
duplication across serverless platforms and add support for the Span
Filtering feature.

This refactoring follows the Template Method pattern, allowing
platform-specific customization through abstract methods while
maintaining a single source of truth for the common serverless agent
behavior.

Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
Add and update agent tests to validate the new agent architecture:
- 890 lines in test_base_agent.py for BaseAgent functionality
- 447 lines in test_serverless_agent.py for ServerlessAgent base class
- 217 lines in test_fargate_span_filtering.py for Fargate span filtering
- Update test_host.py and test_eksfargate.py to align with refactored code

Ensures all agent implementations maintain correct behavior after the
serverless agent consolidation refactoring.

Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
@pvital pvital force-pushed the serverless_span_filtering branch from cf2c136 to 8ad6d39 Compare May 14, 2026 09:11
@sonarqubecloud
Copy link
Copy Markdown

@pvital pvital requested a review from CagriYonca May 15, 2026 05:44
Copy link
Copy Markdown
Contributor

@GSVarsha GSVarsha left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Copy Markdown
Contributor

@CagriYonca CagriYonca left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@pvital pvital merged commit e7937e4 into main May 15, 2026
20 checks passed
@pvital pvital deleted the serverless_span_filtering branch May 15, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants