Swiftpack.co - immobiliare/Glider-Sentry as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by immobiliare.
immobiliare/Glider-Sentry 2.0.0
Sentry.io Transport for Glider - Universal Logging for Swift
⭐️ 5
🕓 1 year ago
iOS macOS tvOS
.package(url: "https://github.com/immobiliare/Glider-Sentry.git", from: "2.0.0")

logo-library

Swift Platform Swift Package Manager CocoaPods Compatible

Glider

Glider is the logger for just about everything!

It's designed to be:

  • SIMPLE: with a modular & extensible architecture, fully documented
  • PERFORMANT: you can use Glider without the worry of impacting your app performances
  • UNIVERSAL: it supports 14+ transports to satisfy every need; you can create your transport too!

See the project's page on GitHub for more informations.

Glider-Sentry

Glider-Sentry is a third party package to connect your Sentry iOS SDK as transport for Glider Logging.
It uses the official sentry-cocoa library as backend and it's maintained by the core team of Glider.

How it works

Once you have integrated Glider in your project you can install this dependency.
It exposes a new transport called GliderSentryTransport; it's used to forward log messages coming from Glider logging system to the Sentry SDK.
When you install this package, sentry-cocoa is a dependency.

let sentryTransport = GliderSentryTransport {
    // If you have not initialized the Sentry SDK yet you can pass a valid
    // `sdkConfiguration` here and the lib will do it for you.
    $0.sdkConfiguration = { ... }
    $0.environment = "MyApp-Production" // set the sentry environment
}

let logger = Log {
    $0.level = .info
    $0.transports = [sentryTransport]
    $0.extra = [...] // extras are sent automatically as sentry's extras
    $0.tags = [...] // tags are sent automatically as sentry's tags
}

All the relevants infos set using Glider are also forwarded automatically to the Sentry SDK. It includes:

  • global Glider's user property set via GliderSDK.shared.scope.user
  • environment variable set on GliderSentryTransport's instance
  • log message's extra dictionary
  • log message's tags dictionary

Install

This package require the Core Library of Glider you can found here.
Package is distributed both as CocoaPods dependency and SPM dependency.

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but Glider does support its use on supported platforms.

Once you have your Swift package set up, adding Glider as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/immobiliare/Glider-Sentry")
]

Manifest also includes third-party packages for other transports, like ELK or Sentry.
The Glider core SDK is the Glider package.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.
To integrate Glider into your project, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!

pod 'GliderSentry'

Requirements

Minimum requirements are:

  • Swift 5.1
  • iOS 11+, macOS 10.14+, tvOS 12.0+
  • Sentry SDK 7+

Support & Contribute

Made with ❤️ by ImmobiliareLabs & Contributors

We'd love for you to contribute to Glider!
If you have questions on using Glider, bugs, and enhancement, please feel free to reach out by opening a GitHub Issue.

Indomio

GitHub

link
Stars: 5
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

2.0.0
1 year ago

Released on 2022-12-21

  • Moved from main repository. Uses Sentry-Cocoa v7+

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics