{"id":22025473,"url":"https://github.com/getsidetrack/vapor-telemetrydeck","last_synced_at":"2025-05-07T09:35:14.278Z","repository":{"id":43815941,"uuid":"458874861","full_name":"getsidetrack/vapor-telemetrydeck","owner":"getsidetrack","description":"📈 Vapor client for posting signals to TelemetryDeck, a privacy-conscious analytics service for apps and websites.","archived":false,"fork":false,"pushed_at":"2022-12-20T16:06:06.000Z","size":20,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-15T23:56:06.366Z","etag":null,"topics":["analytics","privacy-protection","server-side-swift","swift","telemetry","vapor"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getsidetrack.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":"2022-02-13T17:05:49.000Z","updated_at":"2025-02-26T16:42:33.000Z","dependencies_parsed_at":"2022-09-21T01:00:23.766Z","dependency_job_id":null,"html_url":"https://github.com/getsidetrack/vapor-telemetrydeck","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsidetrack%2Fvapor-telemetrydeck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsidetrack%2Fvapor-telemetrydeck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsidetrack%2Fvapor-telemetrydeck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsidetrack%2Fvapor-telemetrydeck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getsidetrack","download_url":"https://codeload.github.com/getsidetrack/vapor-telemetrydeck/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252851698,"owners_count":21814197,"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":["analytics","privacy-protection","server-side-swift","swift","telemetry","vapor"],"created_at":"2024-11-30T07:17:17.719Z","updated_at":"2025-05-07T09:35:14.237Z","avatar_url":"https://github.com/getsidetrack.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    TelemetryDeck client for Vapor\n    \u003cbr\u003e\n    \u003cbr\u003e\n    \u003ca href=\"https://docs.vapor.codes/4.0/\"\u003e\n        \u003cimg src=\"http://img.shields.io/badge/read_the-docs-2196f3.svg\" alt=\"Documentation\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://discord.gg/vapor\"\u003e\n        \u003cimg src=\"https://img.shields.io/discord/431917998102675485.svg\" alt=\"Team Chat\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"LICENSE\"\u003e\n        \u003cimg src=\"http://img.shields.io/badge/license-MIT-brightgreen.svg\" alt=\"MIT License\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/getsidetrack/vapor-telemetrydeck/actions\"\u003e\n        \u003cimg src=\"https://github.com/getsidetrack/vapor-telemetrydeck/workflows/test/badge.svg\" alt=\"Continuous Integration\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://swift.org\"\u003e\n        \u003cimg src=\"http://img.shields.io/badge/swift-5.2-brightgreen.svg\" alt=\"Swift 5.2\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\n## Usage\n\nOnce you have added the package to your project, you must initialise the library. This is usually done in `configure.swift`.\n\n```swift\nimport TelemetryDeck\n\napp.telemetryDeck.initialise(appID: \"\u003cYOUR-APP-ID\u003e\")\n```\n\n### Sending a Signal\n\nThere are two ways to send a signal. One method is from the \"system\", which contains a static user identifier.\n\n```swift\ntry await app.telemetryDeck.send(\"applicationStarted\")\n```\n\nThe second option is from a request, this will set the user identifier to be a hashed version of the request IP address.\n\n```swift\ntry await request.telemetryDeck.send(\"homePage\")\n\n// for example:\n\napp.get(\"home\") { req async throws -\u003e String in\n  try await req.telemetryDeck.send(\"homePage\")\n  return \"your page content\"\n}\n```\n\n### Properties\n\nYou can attach additional payload data with each signal by adding `additionalPayload` to the send functions.\n\n```swift\ntry await app.telemetryDeck.send(\"applicationStarted\", additionalPayload: [\n  \"host\": \"gcp\"\n])\n```\n\nYou may also configure TelemetryDeck for Vapor with a dictionary of default properties which are sent with every signal.\n\n```swift\napp.telemetryDeck.defaultParameters[\"key\"] = \"value\"\n```\n\n## Sessions\n\nWith each signal, we send through a session identifier which is a unique UUID generated on initialisation. This is intended\nto be different for each running instance of your server, changing each time you reboot the server.\n\n## Test Mode\n\nIf you launch Vapor in a non-release environment, signals will be marked as being in test mode. In the Telemetry Viewer app, \nactvivate **Test Mode** to see those.\n\n## Signal Batching\n\nThis library does not currently support signal batching. This means that signals are sent to TelemetryDeck as you call the functions. \nIn a future release, we may add the capability to batch signals in memory and post them at regular intervals.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetsidetrack%2Fvapor-telemetrydeck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetsidetrack%2Fvapor-telemetrydeck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetsidetrack%2Fvapor-telemetrydeck/lists"}