Skip to content

Commit

Permalink
Add feedback from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignacio Bonafonte committed Aug 17, 2023
1 parent 90baefd commit f85280d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public class URLSessionInstrumentation {
private let queue = DispatchQueue(label: "io.opentelemetry.ddnetworkinstrumentation")

static var instrumentedKey = "io.opentelemetry.instrumentedCall"

static let avAssetDownloadTask: AnyClass? = NSClassFromString("__NSCFBackgroundAVAssetDownloadTask")

public private(set) var tracer: Tracer

Expand Down Expand Up @@ -572,8 +574,8 @@ public class URLSessionInstrumentation {

private func urlSessionTaskWillResume(_ task: URLSessionTask) {
// AV Asset Tasks cannot be auto instrumented, they dont include request attributes, skip them
if let avAssetDownloadTask = NSClassFromString("__NSCFBackgroundAVAssetDownloadTask"),
task.isKind(of: avAssetDownloadTask) {
if let avAssetTaskClass = Self.avAssetDownloadTask,
task.isKind(of: avAssetTaskClass) {
return
}

Expand Down

0 comments on commit f85280d

Please sign in to comment.