Skip to content

Commit

Permalink
Add support for release and environment string
Browse files Browse the repository at this point in the history
  • Loading branch information
devSparkle committed Dec 3, 2022
1 parent 50b865c commit e700905
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion MainModule.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ type HubOptions = {
DSN: string?,
debug: boolean?,

Release: string?,
Environment: string?,

AutoTrackClient: boolean?,
AutoErrorTracking: boolean?,
AutoWarningTracking: boolean?,
Expand Down Expand Up @@ -320,7 +323,7 @@ function SDK:Init(Options: HubOptions?)
self.Options = table.freeze(Options)
self.Scope = {
server_name = game.JobId,
release = string.format("%s#%d@%d", game.Name, game.PlaceId, game.PlaceVersion),
release = self.Options.Release or string.format("%s#%d@%d", game.Name, game.PlaceId, game.PlaceVersion),

logger = (if RunService:IsServer() then "server" else "client"),
environment = self.Options.Environment or (if RunService:IsStudio() then "studio" else "live"),
Expand Down

0 comments on commit e700905

Please sign in to comment.