Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions WireAnalytics/Sources/WireDatadog/WireDatadog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public import WireLogging

import CryptoKit
import DatadogCore
import DatadogCrashReporting
import DatadogLogs
import DatadogTrace
import UIKit
Expand Down Expand Up @@ -65,6 +66,8 @@ public final class WireDatadog {
trackingConsent: .granted
)

CrashReporting.enable()

let logsConfiguration = Logs.Configuration()
Logs.enable(with: logsConfiguration)

Expand Down
20 changes: 20 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ platform :ios do
lane :development do |options|
options[:build_type] = "Development"
options[:upload_testflight] = true
options[:upload_dsyms_to_datadog] = true
options[:extra_distribution_groups] = ["Wire Employees"]
options[:produce_debug_builds] = true
options[:countly_api_key] = ENV['COUNTLY_INTERNAL_KEY']
Expand All @@ -246,6 +247,7 @@ platform :ios do
lane :playground do |options|
options[:build_type] = "Playground"
options[:upload_testflight] = true
options[:upload_dsyms_to_datadog] = true
options[:extra_distribution_groups] = ["Wire Employees", "Externals - Non Wire Employees"]
options[:produce_debug_builds] = true
options[:countly_api_key] = ENV['COUNTLY_INTERNAL_KEY']
Expand All @@ -258,6 +260,7 @@ platform :ios do
lane :testflight_beta do |options|
options[:build_type] = "Beta"
options[:upload_testflight] = true
options[:upload_dsyms_to_datadog] = true
options[:produce_debug_builds] = true
options[:countly_api_key] = ENV['COUNTLY_INTERNAL_KEY']
options[:extra_distribution_groups] = ["Wire Employees", "Externals - Non Wire Employees"]
Expand Down Expand Up @@ -424,6 +427,10 @@ platform :ios do
sha256(options)
upload_s3(options)
save_changelog_to_env(options)

if options[:upload_dsyms_to_datadog] || false
upload_dsyms_to_datadog(options)
end
end

def save_app_name(name)
Expand Down Expand Up @@ -919,6 +926,19 @@ platform :ios do
changelog = changelog(build)
`export TEMP='RELEASE_NOTES=#{Base64.strict_encode64(changelog)}' && echo $TEMP >> ./.post_build/.env`
end

# Upload dsyms to Datadog
def upload_dsyms_to_datadog(options)
build = Build.new(options: options)

upload_symbols_to_datadog(
api_key: ENV["DATADOG_API_KEY"],
dsym_paths: [
"#{build.artifact_path(with_filename: true)}.app.dSYM.zip"
],
site: "datadoghq.eu"
)
end
Comment on lines +931 to +941
end

class Build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ final class DeveloperToolsViewModel: ObservableObject {
sections.append(Section(
header: "Datadog",
items: [
.text(TextItem(title: "User ID", value: datadogUserIdentifier))
.text(TextItem(title: "User ID", value: datadogUserIdentifier)),
.button(.init(title: "Crash Report Test", action: { fatal("crash app") }))
Comment thread
samwyndham marked this conversation as resolved.
]
))
}
Expand Down
Loading