This file contains hidden or 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
| using System.Collections.Generic; | |
| using Microsoft.AspNetCore.Builder; | |
| using Microsoft.AspNetCore.Hosting; | |
| using Microsoft.Extensions.Configuration; | |
| using Microsoft.Extensions.DependencyInjection; | |
| using Microsoft.Extensions.Hosting; | |
| using OpenTelemetry.Resources; | |
| using OpenTelemetry.Trace.Configuration; | |
| using OpenTelemetry.Trace.Samplers; |
This file contains hidden or 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
| package main | |
| import ( | |
| "context" | |
| "encoding/json" | |
| "io/ioutil" | |
| "net/http" | |
| "go.opentelemetry.io/otel/plugin/httptrace" | |
| ) |
This file contains hidden or 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
| package main | |
| import ( | |
| "context" | |
| "distributed-tracing-otel/tracing" | |
| "distributed-tracing-otel/weatherpb" | |
| "log" | |
| "net" | |
| "go.opentelemetry.io/otel/api/global" |
This file contains hidden or 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
| package tracing | |
| import ( | |
| "log" | |
| "go.opentelemetry.io/otel/api/kv" | |
| "go.opentelemetry.io/otel/exporters/trace/jaeger" | |
| sdktrace "go.opentelemetry.io/otel/sdk/trace" | |
| ) |
This file contains hidden or 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
| package main | |
| import ( | |
| "context" | |
| "log" | |
| "distributed-tracing-otel/tracing" | |
| "distributed-tracing-otel/weatherpb" | |
| "go.opentelemetry.io/otel/api/global" |
This file contains hidden or 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
| package main | |
| import ( | |
| "crypto/md5" | |
| "log" | |
| "net/http" | |
| "github.com/gorilla/mux" | |
| ) |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| var rand int = 0 | |
| func main() { |
This file contains hidden or 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
| package accounts | |
| import ( | |
| "errors" | |
| "my-package/amounts" | |
| ) | |
| type Account struct { | |
| balance amounts.Amount | |
| } |
This file contains hidden or 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
| package amounts | |
| import "errors" | |
| type Amount struct { | |
| value int | |
| } | |
| func NewAmount(value int) (Amount, error) { | |
| if value < 0 { |
This file contains hidden or 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
| sonar.projectKey=<your-project-name> | |
| sonar.host.url=http://localhost:9000 | |
| sonar.login=<token> | |
| sonar.sources=. | |
| sonar.exclusions=**/*_test.go | |
| sonar.tests=. | |
| sonar.test.inclusions=**/*_test.go | |
| sonar.go.coverage.reportPaths=cov.out |