Skip to content

Improve Kafka instrumentation interaction with custom instrumentation #2829

Open
@nrcventura

Description

The .net agent did not always support automatic instrumentation of Kafka. Many people previously relied on custom instrumentation of services to provide visibility into their kafka consumers. After adding support for kafka instrumentation, there have been scenarios where the kafka instrumentation can end the transaction before the custom instrumentation expected the transaction to end.

This happens because the Kafka instrumentation expected to create the transaction, and when it's call is done, it will end the transaction.

There are two possible ways to handle this problem.

  1. The agent instrumentation can check to see if a transaction already exists and only end the transaction if one didn't previously exist.
  2. Try to leverage the unit of work parameter in the CreateTransaction method (this might need to be tied to a transaction existence check though).

Acceptance Criteria

  • Custom transactions created before our kafka consumption instrumented method runs do not end until the custom instrumentation says it should.

Dependencies

None

Estimates

Initial t-shirt size: M

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions