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

Adding Telemetry info for Analytics-Swift and Analytics-Kotlin SDKs #7184

Merged
merged 8 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ If you proxy your events through the `apiHost` config option, you must forward t
> warning ""
> If you are using the Analytics iOS (Classic) SDK, you can find [the documentation here](/docs/connections/sources/catalog/libraries/mobile/ios). Many of the features available in the Analytics-Swift SDK are not available in the Analytics iOS (Classic) SDK.

## Telemetry
The Analytics-Swift SDK collects telemetry data on configuration and usage by default. This includes basic information on SDK setup, plugins and event types used, and basic error details. No personally identifiable information (PII) or event data is collected, and Segment downsamples the data to minimize traffic.
MichaelGHSeg marked this conversation as resolved.
Show resolved Hide resolved

You can disable telemetry at any time by setting `Telemetry.shared.enable = false`.

When internal errors or errors from plugins occur, the write key may be included with error data to help you identify the issue(s). You can disable this by setting `Telemetry.shared.sendWriteKeyOnError = false`.

## Timestamps in Swift
Due to efficiency updates made to Segment's Swift library, Segment now adds the `sentAt` timestamp to an event when the batch is complete and initially tried to the Segment API. This can impact the value of the `timestamp` field calculated by Segment if users are operating in an offline mode. More details on this change can be seen in Segment's [timestamp documentation](/docs/connections/spec/common/#sentat).

Original file line number Diff line number Diff line change
Expand Up @@ -201,5 +201,12 @@ Analytics-Kotlin is built with extensibility in mind. Use the tools list below t
> warning ""
> If you are using the Analytics Android (Classic) SDK, you can find [the documentation here](/docs/connections/sources/catalog/libraries/mobile/android). Many of the features available in the Analytics Kotlin SDK are not available in the Analytics Android (Classic) SDK.

## Telemetry
Telemetry data related to the configuration and usage of the Analytics-Kotlin SDK is collected and sent to Segment by default. This includes some basic configuration information, plugins and event types used, and basic error information. No PII or event data is collected and the information is downsampled to reduce traffic.
MichaelGHSeg marked this conversation as resolved.
Show resolved Hide resolved

The Telemetry system can be disabled at any time by setting `Telemetry.enable = false`.
MichaelGHSeg marked this conversation as resolved.
Show resolved Hide resolved

When internal errors or errors from plugins occur, the writekey may be included with the error data to help customers track down problems. This can be disabled by setting `Telemetry.sendWriteKeyOnError = false`.
MichaelGHSeg marked this conversation as resolved.
Show resolved Hide resolved

## Timestamps in Kotlin
Due to efficiency updates made to Segment's Kotlin library, Segment now adds the `sentAt` timestamp to an event when the batch is complete and initially tried to the Segment API. This can impact the value of the `timestamp` field calculated by Segment if users are operating in an offline mode. More details on this change can be seen in Segment's [timestamp documentation](/docs/connections/spec/common/#sentat).