Giter Site home page Giter Site logo

immobiliare / glider-sentry Goto Github PK

View Code? Open in Web Editor NEW
5.0 6.0 0.0 295 KB

Sentry.io Transport for Glider - Universal Logging for Swift

Ruby 8.68% Swift 91.32%
logging logging-framework logging-library sentry sentry-integration sentry-io swiftlog transport

glider-sentry's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.