diff --git a/Sources/Honeycomb/Honeycomb.swift b/Sources/Honeycomb/Honeycomb.swift index 6b87590..aa6c356 100644 --- a/Sources/Honeycomb/Honeycomb.swift +++ b/Sources/Honeycomb/Honeycomb.swift @@ -174,7 +174,7 @@ public class Honeycomb { OpenTelemetry.registerLoggerProvider(loggerProvider: loggerProvider) installNetworkInstrumentation(options: options) - InstallUINavigationInstrumentation() + installUINavigationInstrumentation() if #available(iOS 13.0, macOS 12.0, *) { MXMetricManager.shared.add(self.metricKitSubscriber) diff --git a/Sources/Honeycomb/UIKit/NavigationInstrumentation.swift b/Sources/Honeycomb/UIKit/NavigationInstrumentation.swift index 1f8d6c0..2b811d1 100644 --- a/Sources/Honeycomb/UIKit/NavigationInstrumentation.swift +++ b/Sources/Honeycomb/UIKit/NavigationInstrumentation.swift @@ -5,7 +5,7 @@ private let honeycombInstrumentationView = "@honeycombio/instrumented-view" - public func InstallUINavigationInstrumentation() { + public func installUINavigationInstrumentation() { UIViewController.swizzle() } diff --git a/Sources/Honeycomb/UIKit/UIViewController.swift b/Sources/Honeycomb/UIKit/UIViewController.swift index d07c98f..f0e3ea3 100644 --- a/Sources/Honeycomb/UIKit/UIViewController.swift +++ b/Sources/Honeycomb/UIKit/UIViewController.swift @@ -4,16 +4,16 @@ import UIKit extension UIViewController { - @objc func trace_viewDidAppear(_ animated: Bool) { + @objc func traceViewDidAppear(_ animated: Bool) { let span = getViewTracer().spanBuilder(spanName: "viewDidAppear").startSpan() span.setAttribute(key: "title", value: self.title ?? "") span.setAttribute(key: "animated", value: animated) span.setAttribute(key: "className", value: NSStringFromClass(type(of: self))) span.end() - trace_viewDidAppear(animated) + traceViewDidAppear(animated) } - @objc func trace_viewDidDisappear(_ animated: Bool) { + @objc func traceViewDidDisappear(_ animated: Bool) { let span = getViewTracer().spanBuilder(spanName: "viewDidDisappear").startSpan() span.setAttribute(key: "title", value: self.title ?? "") span.setAttribute(key: "animated", value: animated) @@ -24,9 +24,9 @@ public static func swizzle() { let originalAppearSelector = #selector(UIViewController.viewDidAppear(_:)) - let swizzledAppearSelector = #selector(UIViewController.trace_viewDidAppear(_:)) + let swizzledAppearSelector = #selector(UIViewController.traceViewDidAppear(_:)) let originalDisappearSelector = #selector(UIViewController.viewDidDisappear(_:)) - let swizzledDisappearSelector = #selector(UIViewController.trace_viewDidDisappear(_:)) + let swizzledDisappearSelector = #selector(UIViewController.traceViewDidDisappear(_:)) guard let originalAppearMethod = class_getInstanceMethod(self, originalAppearSelector),