-
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.
- Loading branch information
1 parent
918b2e9
commit b737cc7
Showing
635 changed files
with
281,140 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
linters-settings: | ||
dupl: | ||
threshold: 100 | ||
funlen: | ||
lines: 100 | ||
statements: 50 | ||
goconst: | ||
min-len: 2 | ||
min-occurrences: 3 | ||
gocritic: | ||
enabled-tags: | ||
- diagnostic | ||
- experimental | ||
- opinionated | ||
- performance | ||
- style | ||
gocyclo: | ||
min-complexity: 15 | ||
goimports: | ||
local-prefixes: github.com/golangci/golangci-lint | ||
gomnd: | ||
# don't include the "operation" and "assign" | ||
checks: | ||
- argument | ||
- case | ||
- condition | ||
- return | ||
ignored-numbers: | ||
- '0' | ||
- '1' | ||
- '2' | ||
- '3' | ||
ignored-functions: | ||
- strings.SplitN | ||
govet: | ||
check-shadowing: true | ||
enable: | ||
- fieldalignment | ||
lll: | ||
line-length: 200 | ||
misspell: | ||
locale: US | ||
nolintlint: | ||
allow-unused: false # report any unused nolint directives | ||
require-explanation: false # don't require an explanation for nolint directives | ||
require-specific: false # don't require nolint directives to be specific about which linter is being skipped | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- bodyclose | ||
- dogsled | ||
- lll | ||
- dupl | ||
- errcheck | ||
- exportloopref | ||
- funlen | ||
- gochecknoinits | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
- gofmt | ||
- goimports | ||
- gomnd | ||
- goprintffuncname | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- misspell | ||
- nakedret | ||
- noctx | ||
- nolintlint | ||
- staticcheck | ||
- stylecheck | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- whitespace | ||
- wsl | ||
- gocognit | ||
- godot | ||
- goheader | ||
- gomodguard | ||
- gci | ||
- nestif | ||
- prealloc | ||
- gochecknoinits | ||
- goconst | ||
- gocritic | ||
|
||
run: | ||
tests: false | ||
concurrency: 5 | ||
skip-dirs-use-default: true |
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,2 @@ | ||
## This file is used by the Hadolint linter to ignore certain rules. This will contain a list of rules to be ignored. | ||
ignored: |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 @@ | ||
v0.0.1 |
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 |
---|---|---|
@@ -1 +1,27 @@ | ||
# go-jaeger | ||
# go-tracer | ||
Tracing library for Go applications using OpenTracing. This library hooks into the logrus library. | ||
|
||
## Usage | ||
Please see the [examples](https://github.com/cksidharthan/go-jaeger/blob/main/example/example.go) directory for usage examples. | ||
|
||
## Running the example | ||
1. Run the Jaeger all-in-one docker image | ||
```bash | ||
task run-jaeger | ||
``` | ||
2. Run the example | ||
```bash | ||
task run-example | ||
``` | ||
3. Open the Jaeger UI | ||
```bash | ||
task open-jaeger-ui | ||
``` | ||
|
||
# Screenshots | ||
After running the example, you can see the traces in the Jaeger UI as shown below. | ||
![Screenshot](./assets/jaeger-ui-example.png) | ||
|
||
|
||
# Contributing | ||
Please feel free to raise issues and submit PRs. |
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,74 @@ | ||
version: 3 | ||
|
||
|
||
tasks: | ||
dev-setup: | ||
desc: "Setup development environment" | ||
cmds: | ||
- go install golang.org/x/tools/cmd/goimports@latest | ||
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.0 | ||
- go install github.com/nikolaydubina/go-cover-treemap@latest | ||
|
||
deps: | ||
desc: "Dependencies Check" | ||
cmds: | ||
- go mod download | ||
- go mod tidy | ||
- go mod verify | ||
- go mod vendor | ||
|
||
fmt: | ||
desc: "Format Check" | ||
cmds: | ||
- goimports -w -e $(find . -type f -name '*.go' -not -path "*/vendor/*") | ||
|
||
lint: | ||
desc: "Lint Check" | ||
cmds: | ||
- golangci-lint run --fix | ||
- go vet ./... | ||
|
||
test: | ||
desc: "Running unit Tests" | ||
cmds: | ||
- go test -coverprofile cover.out ./pkg/... | ||
- go tool cover -html=cover.out -o cover.html | ||
- go-cover-treemap -coverprofile cover.out > assets/cover-treemap.svg | ||
|
||
run-jaeger: | ||
desc: "Run Jaeger" | ||
cmds: | ||
- docker run -d --name jaeger -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 -p 5775:5775/udp -p 6831:6831/udp -p 6832:6832/udp -p 5778:5778 -p 16686:16686 -p 14268:14268 -p 9411:9411 jaegertracing/all-in-one:latest | ||
|
||
stop-jaeger: | ||
desc: "Stop Jaeger" | ||
cmds: | ||
- docker stop jaeger | ||
|
||
run-example: | ||
desc: "Run example" | ||
cmds: | ||
- go run example/main.go | ||
|
||
open-jaeger-ui: | ||
desc: "Open Jaeger UI" | ||
cmds: | ||
- open http://localhost:16686 | ||
|
||
dc-up: | ||
desc: "Start docker-compose" | ||
cmds: | ||
- docker-compose up -d -f deploy/docker-compose/docker-compose.yml | ||
|
||
dc-down: | ||
desc: "Stop docker-compose" | ||
cmds: | ||
- docker-compose down -f deploy/docker-compose/docker-compose.yml | ||
|
||
pr-check: | ||
desc: "Run all checks" | ||
cmds: | ||
- task: deps | ||
- task: fmt | ||
- task: lint | ||
- task: test |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,24 @@ | ||
version: '3.8' | ||
|
||
services: | ||
jaeger: | ||
image: jaegertracing/all-in-one:1.44.0 | ||
container_name: jaeger | ||
networks: | ||
- dev-network | ||
ports: | ||
- "6831:6831/udp" | ||
- "6832:6832/udp" | ||
- "5775:5775/udp" | ||
- "5778:5778" | ||
- "16686:16686" | ||
- "14268:14268" | ||
- "9411:9411" | ||
environment: | ||
- COLLECTOR_OTLP_ENABLED=true | ||
- LOG_LEVEL=debug | ||
- COLLECTOR_ZIPKIN_HTTP_PORT=9411 | ||
|
||
networks: | ||
dev-network: | ||
driver: bridge |
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 @@ | ||
FROM docker.io/jaegertracing/all-in-one:1.44.0 | ||
|
||
RUN addgroup -S jaegergroup && adduser -S jaeger -G jaegergroup | ||
|
||
USER jaeger |
Oops, something went wrong.