Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Emitting Application Insights Custom Events #44262

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rajkumar-rangaraj
Copy link
Contributor

@rajkumar-rangaraj rajkumar-rangaraj commented Feb 19, 2025

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

Summary:
This PR enables the emission of Application Insights Custom Events based on OpenTelemetry LogRecords.

Implementation Details:

  • If the microsoft.custom_event.name attribute is found in the LogRecord:
  • The SDK emits a Custom Event.
  • The Name of the event is set to the value of microsoft.custom_event.name.
  • If the attribute is not present, the LogRecord follows its default behavior.

Changes Made:

  • Implemented logic for detecting and processing microsoft.custom_event.name.
  • Added unit tests to ensure correct behavior.

How to Test:
Emit a LogRecord with the microsoft.custom_event.name attribute.
Verify that the telemetry is emitted as EventTelemetry with the expected name.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@github-actions github-actions bot added the OpenTelemetry OpenTelemetry instrumentation label Feb 19, 2025
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenTelemetry OpenTelemetry instrumentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants