{"id":25829372,"url":"https://github.com/matis-schotte/tracingactivity","last_synced_at":"2025-07-21T19:35:43.320Z","repository":{"id":41158603,"uuid":"268049324","full_name":"matis-schotte/TracingActivity","owner":"matis-schotte","description":"TracingActivity provides Apples Activity Tracing as part of Unified Logging for pure Swift applications.","archived":false,"fork":false,"pushed_at":"2020-06-06T08:39:36.000Z","size":35,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T04:02:29.645Z","etag":null,"topics":["activity-tracing","apples-activity-tracing","debugging","ios","macos","module","package","swift","tvos","unified-logging","watchos","xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matis-schotte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-30T09:34:38.000Z","updated_at":"2022-06-29T03:53:29.000Z","dependencies_parsed_at":"2022-09-01T13:22:58.245Z","dependency_job_id":null,"html_url":"https://github.com/matis-schotte/TracingActivity","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matis-schotte%2FTracingActivity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matis-schotte%2FTracingActivity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matis-schotte%2FTracingActivity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matis-schotte%2FTracingActivity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matis-schotte","download_url":"https://codeload.github.com/matis-schotte/TracingActivity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241205761,"owners_count":19927144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activity-tracing","apples-activity-tracing","debugging","ios","macos","module","package","swift","tvos","unified-logging","watchos","xcode"],"created_at":"2025-02-28T18:58:08.290Z","updated_at":"2025-02-28T18:58:08.935Z","avatar_url":"https://github.com/matis-schotte.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TracingActivity\n\n![build](https://img.shields.io/badge/build-passing-success)\n![tests](https://img.shields.io/badge/tests-passing-success)\n![language](https://img.shields.io/badge/language-swift-important)\n[![license](https://img.shields.io/github/license/matis-schotte/TracingActivity.svg)](./LICENSE)\n\n![platform](https://img.shields.io/badge/platform-iOS%20|%20macOS%20|%20tvOS%20|%20watchOS-lightgrey.svg)\n[![Twitter](https://img.shields.io/badge/twitter-@matis_schotte-blue.svg)](http://twitter.com/matis_schotte)\n\n![Ethereum](https://img.shields.io/badge/ethereum-0x25C93954ad65f1Bb5A1fd70Ec33f3b9fe72e5e58-yellowgreen.svg)\n![Litecoin](https://img.shields.io/badge/litecoin-MPech47X9GjaatuV4sQsEzoMwGMxKzdXaH-lightgrey.svg)\n\nTracingActivity provides Apples Activity Tracing as part of Unified Logging for pure Swift applications.\nCreation of a tracing activity can fail, but all blocks will always be executed.\nThe return values will inform if the code was executed inside the activity (success = true) or outside (in case the activity could not be created).\nNesting of activities is encouraged for sub-tasks.\n\n## Requirements\n- Swift \u003e= 4\n- iOS \u003e= 10\n- macOS \u003e= 10.12\n- tvOS \u003e= 10\n- watchOS \u003e= 3.0\n\n## Installation\n### Swift Package Manager\n\nThe [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler.\n\nAdd the Package URL `https://github.com/matis-schotte/TracingActivity.git` in Xcodes project viewer.\nAdding it to another Package as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.\n\n```swift\ndependencies: [\n\t.package(url: \"https://github.com/matis-schotte/TracingActivity.git\", from: \"0.1.0\")\n]\n```\n\n## Usage\nBlock-based activity tracing once:\n```swift\n_ = TracingActivity.initiate(\"Activity\") {\n\t// ... os_log stuff\n}\n```\nActivity tracing for multiple blocks:\n```swift\nlet activity: TracingActivity? = TracingActivity(\"Activity\")\n_ = TracingActivity.apply(activity) {\n\t// ... os_log stuff\n}\n```\nScope-based activity tracing:\n```swift\nlet activity: TracingActivity? = TracingActivity(\"Activity2\")\nvar scope = activity?.enter()\n// ... os_log stuff\ndefer {\n\tscope?.leave()\n}\n```\n\n[//]: # (Example: See the example project inside the `examples/` folder.)\n\n## ToDo\n- Add SwiftLint (by adding xcodeproj: `swift package generate-xcodeproj`, helps support Xcode Server, too)\n- Add Travis CI (without xcodeproj see [reddit](https://www.reddit.com/r/iOSProgramming/comments/d7oyvh/configure_travis_ci_on_github_to_build_ios_swift/), [medium](https://medium.com/@aclaytonscott/creating-and-distributing-swift-packages-132444f5dd1))\n- Add codecov\n- Add codebeat\n- Add codeclimate\n- Add codetriage\n- Add jazzy docs\n- Add CHANGELOG.md\n- Clean api docs\n- Add Carthage support\n- Add Cocoapods support\n\n[//]: # (Donations: ETH, LTC welcome.)\n\n## License\nTracingActivity is available under the Apache-2.0 license. See the [LICENSE](https://github.com/matis-schotte/TracingActivity/blob/master/LICENSE) file for more info.\n\n## Author\nMatis Schotte, [dm26f1cab8aa26@ungeord.net](mailto:dm26f1cab8aa26@ungeord.net)\n\n[https://github.com/matis-schotte/TracingActivity](https://github.com/matis-schotte/TracingActivity)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatis-schotte%2Ftracingactivity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatis-schotte%2Ftracingactivity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatis-schotte%2Ftracingactivity/lists"}