forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cockroachdb#110 from crowdflux/feature/sentry_inte…
…gration Feature/sentry integration
- Loading branch information
Showing
40 changed files
with
222 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package log_tags | ||
|
||
import "tag" | ||
|
||
var MESSAGE = &tag.Tag{"message"} | ||
|
||
var USER_ID = &tag.Tag{"user_id"} | ||
var CLIENT_ID = &tag.Tag{"client_id"} | ||
|
||
var RESPONSE_BODY = &tag.Tag{"response_body"} | ||
var REQUEST_BODY = &tag.Tag{"request_body"} | ||
|
||
var HEADER = &tag.Tag{"header"} | ||
|
||
var RECOVER = &tag.Tag{"recover"} | ||
|
||
var FILE_NAME = &tag.Tag{"file_name"} | ||
var FILE_PATH = &tag.Tag{"file_path"} | ||
var ROW_NUM = &tag.Tag{"row_number"} | ||
var COLUMN_NUM = &tag.Tag{"column_number"} | ||
|
||
var FLU_ID = &tag.Tag{"flu_id"} | ||
var MASTER_FLU_ID = &tag.Tag{"master_flu_id"} | ||
var FLU_BUILD = &tag.Tag{"flu_build"} | ||
var FLU = &tag.Tag{"flu"} | ||
var PROJECT_ID = &tag.Tag{"project_id"} | ||
var WORKFLOW_ID = &tag.Tag{"workflow_id"} | ||
var PROJECT_TAG = &tag.Tag{"project_tag"} | ||
var STEP_ID = &tag.Tag{"step_id"} | ||
|
||
var POSTBACK_REQUEST = &tag.Tag{"postback_request"} | ||
var POSTBACK_RESPONSE = &tag.Tag{"postback_reponse"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package plog | ||
|
||
import ( | ||
"github.com/crowdflux/angel/app/plog/log_tags" | ||
"tag" | ||
) | ||
|
||
type message struct { | ||
Tag tag.Tag `json:"Tag"` | ||
Params interface{} `json:"params,omitempty"` | ||
} | ||
|
||
var MP = MessageWithParam | ||
var M = Message | ||
|
||
func MessageWithParam(tag *tag.Tag, param interface{}) message { | ||
return message{ | ||
Tag: *tag, | ||
Params: param, | ||
} | ||
} | ||
|
||
func Message(param interface{}) message { | ||
return message{ | ||
Tag: *log_tags.MESSAGE, | ||
Params: param, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ import ( | |
"fmt" | ||
"github.com/Sirupsen/logrus" | ||
"github.com/crowdflux/angel/app/config" | ||
"github.com/getsentry/raven-go" | ||
"github.com/jasonlvhit/gocron" | ||
"os" | ||
"path/filepath" | ||
|
@@ -51,6 +52,8 @@ func init() { | |
|
||
setLogger(logr, path, logTypeStr) | ||
|
||
raven.SetDSN("https://b76a676d4e9744ffbdbfe40e522c4fb1:[email protected]/4") | ||
|
||
logLevelStr := strings.ToUpper(config.PLOG_LEVEL.Get()) | ||
|
||
plogLevel = levels[logLevelStr] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package tag | ||
|
||
type Tag struct { | ||
Type string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.