Skip to content

DEMRUM-861: cleanups in custom tracking #341

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

Open
wants to merge 8 commits into
base: feature/customTracking
Choose a base branch
from

Conversation

carlosmcevilly
Copy link

@carlosmcevilly carlosmcevilly commented Jun 19, 2025

  • Refactor a property typeName to have a better name eventName for custom event tracking.
  • Fix the handling of timestamp in Custom Tracking events and errors.
  • Streamline some types, removing unused extensions.
  • Combine multiple track(error:) calls to remove a redundancy.
  • Add code to set OTel attributes for code and namespace if provided in NSError .code and .domain. This can be further improved in the future to also parse the message field but that's not in this code for now.
  • Add demo of tracking an NSError subclass, whose class name will be reported in attribute exception.type.
  • Fix lint issues.

This PR is hoped to be the last (or close to the last) changes to the feature branch before we make a PR for merging the feature/customTracking branch into feature/next-gen. Unit tests are not included yet and will be done separately. The demo app does exercise the features.

If trying this out in Xcode, you'll see stacktrace data in the console; this is intended and is part of the span for errors -- currently not compressed+encoded, but that could be a future step to take.

…ypes

- Remove typeName from SplunkTrackable protocol.
- Use typeName in SplunkTrackableIssue to capture OTel attribute "exception.name" value e.g. NSError.
- Rename typeName in SplunkTrackableEvent to capture event name as passed into API call.
- Use hard coded "error" as name field in any error type.
- Make typeName reflect the actual type we get, such as a subclass of an error type.
…f available.

- exceptionCode mapping to OTel exception.code.
- codeNamespace mapping to OTel code.namespace.
@carlosmcevilly carlosmcevilly requested review from a team as code owners June 19, 2025 04:38
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.

1 participant