Skip to content

Commit

Permalink
Merge pull request #4 from SolaceDev/SOL-103380-rename-package-root
Browse files Browse the repository at this point in the history
SOL-103380: Renamed Package Root
  • Loading branch information
cjwmorgan-sol authored Jan 30, 2024
2 parents a9e4969 + e25e4d0 commit f8fa274
Show file tree
Hide file tree
Showing 32 changed files with 92 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: |
mkdir reports
go install github.com/onsi/ginkgo/v2/[email protected]
ginkgo --junit-report=./reports/report.xml -coverprofile ./reports/coverage.out -coverpkg solace.dev/go/messaging/trace/internal/...,solace.dev/go/messaging/trace/propagation/... -tags enable_debug_logging
ginkgo --junit-report=./reports/report.xml -coverprofile ./reports/coverage.out -coverpkg solace.dev/go/messaging-trace/opentelemetry/internal/...,solace.dev/go/messaging-trace/opentelemetry/... -tags enable_debug_logging
working-directory: ./test

- name: Uploads artifacts
Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ The Solace PubSub+ OpenTelemetry Integration API for Go is used to handle inject

The following are the directories that are part of the repository:
- `./`: contains the API's main entrypoints such as tracing.
- `propagation`: contains the API's interfaces, constants and basic data structures
- `carrier`: contains the API's carrier interfaces
- `internal`: contains the implementation for the PubSub+ OpenTelemetry Integration API for Go
- `logging`: contains the API's logging interfaces, constants and basic data structures
- `test`: contains integration tests for the PubSub+ OpenTelemetry Integration API for Go

### Prerequisites
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Solace: solace.dev/go/messaging/trace/propagation
# Solace: solace.dev/go/messaging-trace/opentelemetry
[![Test](https://github.com/SolaceProducts/pubsubplus-opentelemetry-go-integration/actions/workflows/test.yml/badge.svg)](https://github.com/SolaceProducts/pubsubplus-opentelemetry-go-integration/actions/workflows/test.yml)
[![PkgGoDev](https://pkg.go.dev/badge/solace.dev/go/messaging/trace/propagation.svg)](https://pkg.go.dev/solace.dev/go/messaging/trace/propagation)
[![Go Report Card](https://goreportcard.com/badge/solace.dev/go/messaging/trace/propagation)](https://goreportcard.com/report/solace.dev/go/messaging/trace/propagation)
[![PkgGoDev](https://pkg.go.dev/badge/solace.dev/go/messaging-trace/opentelemetry.svg)](https://pkg.go.dev/solace.dev/go/messaging-trace/opentelemetry)
[![Go Report Card](https://goreportcard.com/badge/solace.dev/go/messaging-trace/opentelemetry)](https://goreportcard.com/report/solace.dev/go/messaging-trace/opentelemetry)

The Solace PubSub+ OpenTelemetry Integration API for Go is used to handle injection and extraction of tracing information for carrier objects (Solace message) for a Solace PubSub+ Event Broker.

## Getting Started

To get started using the Solace PubSub+ OpenTelemetry Integration API for Go, simply include it as a required module in your Go project by running `go get solace.dev/go/messaging/trace/propagation`. The Solace PubSub+ OpenTelemetry Integration API for Go requires Go version 1.20+ (based on the minimum compatible version for opentelemtry-Go [https://github.com/open-telemetry/opentelemetry-go/blob/main/README.md](https://github.com/open-telemetry/opentelemetry-go/blob/main/README.md#compatibility)).
To get started using the Solace PubSub+ OpenTelemetry Integration API for Go, simply include it as a required module in your Go project by running `go get solace.dev/go/messaging-trace/opentelemetry`. The Solace PubSub+ OpenTelemetry Integration API for Go requires Go version 1.20+ (based on the minimum compatible version for opentelemtry-Go [https://github.com/open-telemetry/opentelemetry-go/blob/main/README.md](https://github.com/open-telemetry/opentelemetry-go/blob/main/README.md#compatibility)).

### Usage

Expand Down
2 changes: 1 addition & 1 deletion carrier/inbound_message_carrier.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package carrier // import "solace.dev/go/messaging/trace/propagation/carrier"
package carrier // import "solace.dev/go/messaging-trace/opentelemetry/carrier"

// InboundMessageCarrier is a type of MessageCarrier for inbound messages.
type InboundMessageCarrier interface {
Expand Down
2 changes: 1 addition & 1 deletion carrier/outbound_message_carrier.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package carrier // import "solace.dev/go/messaging/trace/propagation/carrier"
package carrier // import "solace.dev/go/messaging-trace/opentelemetry/carrier"

// OutboundMessageCarrier is a type of MessageCarrier for inbound messages.
type OutboundMessageCarrier interface {
Expand Down
4 changes: 2 additions & 2 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package propagation contains the functions used to handle injection
// Package opentelemetry contains the functions used to handle injection
// and extraction of tracing information for carrier objects (Solace message)
// for a Solace PubSub+ Event Broker.
package propagation
package opentelemetry
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module solace.dev/go/messaging/trace/propagation
module solace.dev/go/messaging-trace/opentelemetry

go 1.20

Expand Down
2 changes: 1 addition & 1 deletion internal/impl/inbound_message_carrier_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package impl

import (
"solace.dev/go/messaging-trace/opentelemetry/internal/impl/logging"
"solace.dev/go/messaging/pkg/solace/message"
"solace.dev/go/messaging/trace/propagation/internal/impl/logging"
)

// InboundMessageCarrier injects and extracts traces from a message.InboundMessage at 'solace.dev/go/messaging/pkg/solace/message'.
Expand Down
2 changes: 1 addition & 1 deletion internal/impl/logging/logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"strings"
"testing"

"solace.dev/go/messaging/trace/propagation/internal/impl/logging"
"solace.dev/go/messaging-trace/opentelemetry/internal/impl/logging"
)

var logLevels []logging.LogLevel = []logging.LogLevel{
Expand Down
4 changes: 2 additions & 2 deletions internal/impl/message_carrier_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ package impl
import (
"strings"

"solace.dev/go/messaging-trace/opentelemetry/internal"
"solace.dev/go/messaging-trace/opentelemetry/internal/impl/logging"
"solace.dev/go/messaging/pkg/solace/message"
"solace.dev/go/messaging/trace/propagation/internal"
"solace.dev/go/messaging/trace/propagation/internal/impl/logging"
)

// MessageWithTracingSupport represents a message received by a consumer.
Expand Down
2 changes: 1 addition & 1 deletion internal/impl/outbound_message_carrier_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package impl

import (
"solace.dev/go/messaging-trace/opentelemetry/internal/impl/logging"
"solace.dev/go/messaging/pkg/solace/message"
"solace.dev/go/messaging/trace/propagation/internal/impl/logging"
)

// OutboundMessageCarrier injects and extracts traces from a message.OutboundMessage at 'solace.dev/go/messaging/pkg/solace/message',
Expand Down
2 changes: 1 addition & 1 deletion internal/utilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"strings"

"solace.dev/go/messaging/trace/propagation/internal/impl/logging"
"solace.dev/go/messaging-trace/opentelemetry/internal/impl/logging"
)

const Version string = "00"
Expand Down
4 changes: 2 additions & 2 deletions logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
// limitations under the License.

// Package logging allows for configuration of this package's logging levels.
package logging // import "solace.dev/go/messaging/trace/propagation/logging"
package logging // import "solace.dev/go/messaging-trace/opentelemetry/logging"

import (
"io"

"solace.dev/go/messaging/trace/propagation/internal/impl/logging"
"solace.dev/go/messaging-trace/opentelemetry/internal/impl/logging"
)

// LogLevel is used to configure the logging-level of the API. The different levels can
Expand Down
2 changes: 1 addition & 1 deletion test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ First, docker and docker-compose must be installed and accessible to the current
To run an individual test, first install the ginkgo command line tool with `go install github.com/onsi/ginkgo/v2/ginkgo@latest`, then run the tests with `ginkgo --focus="mytestregex"` from the test directory. This regex will match describe/context/it strings. For more information, see the [ginkgo documentation](https://onsi.github.io/ginkgo/#the-spec-runner).

## Coverage
Golang provides built in coverage reporting for test suites. A coverage report can be generated with `go test -coverprofile coverage.out -coverpkg solace.dev/go/messaging/trace/propagation/internal/...,solace.dev/go/messaging/trace/propagation/...`. This profile can be viewed as HTML with `go tool cover -html coverage.out`.
Golang provides built in coverage reporting for test suites. A coverage report can be generated with `go test -coverprofile coverage.out -coverpkg solace.dev/go/messaging-trace/opentelemetry/internal/...,solace.dev/go/messaging-trace/opentelemetry/...`. This profile can be viewed as HTML with `go tool cover -html coverage.out`.

## Debug Logging
Debug logs can be enabled on the integration tests by adding the build tag `-tags enable_debug_logging` to the `go test` or `ginkgo` command. By default, the log level is set to Info.
Expand Down
18 changes: 9 additions & 9 deletions test/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module solace.dev/go/messaging/trace/propagation/test
module solace.dev/go/messaging-trace/opentelemetry/test

go 1.20

Expand All @@ -20,10 +20,10 @@ require (
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 // indirect
google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8 // indirect
solace.dev/go/messaging v1.5.0
solace.dev/go/messaging/trace/propagation v1.0.0
solace.dev/go/messaging/trace/propagation/test/sempclient/action v0.0.0
solace.dev/go/messaging/trace/propagation/test/sempclient/config v0.0.0
solace.dev/go/messaging/trace/propagation/test/sempclient/monitor v0.0.0
solace.dev/go/messaging-trace/opentelemetry v1.0.0
solace.dev/go/messaging-trace/opentelemetry/test/sempclient/action v0.0.0
solace.dev/go/messaging-trace/opentelemetry/test/sempclient/config v0.0.0
solace.dev/go/messaging-trace/opentelemetry/test/sempclient/monitor v0.0.0
)

require (
Expand Down Expand Up @@ -52,10 +52,10 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
)

replace solace.dev/go/messaging/trace/propagation v1.0.0 => ../
replace solace.dev/go/messaging-trace/opentelemetry v1.0.0 => ../

replace solace.dev/go/messaging/trace/propagation/test/sempclient/action v0.0.0 => ./sempclient/action
replace solace.dev/go/messaging-trace/opentelemetry/test/sempclient/action v0.0.0 => ./sempclient/action

replace solace.dev/go/messaging/trace/propagation/test/sempclient/config v0.0.0 => ./sempclient/config
replace solace.dev/go/messaging-trace/opentelemetry/test/sempclient/config v0.0.0 => ./sempclient/config

replace solace.dev/go/messaging/trace/propagation/test/sempclient/monitor v0.0.0 => ./sempclient/monitor
replace solace.dev/go/messaging-trace/opentelemetry/test/sempclient/monitor v0.0.0 => ./sempclient/monitor
6 changes: 3 additions & 3 deletions test/helpers/error_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"errors"
"fmt"

"solace.dev/go/messaging-trace/opentelemetry/test/sempclient/action"
"solace.dev/go/messaging-trace/opentelemetry/test/sempclient/config"
"solace.dev/go/messaging-trace/opentelemetry/test/sempclient/monitor"
"solace.dev/go/messaging/pkg/solace"
"solace.dev/go/messaging/pkg/solace/subcode"
"solace.dev/go/messaging/trace/propagation/test/sempclient/action"
"solace.dev/go/messaging/trace/propagation/test/sempclient/config"
"solace.dev/go/messaging/trace/propagation/test/sempclient/monitor"

//lint:ignore ST1001 dot import is fine for tests
. "github.com/onsi/gomega"
Expand Down
4 changes: 2 additions & 2 deletions test/helpers/messaging_service_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"net/url"
"time"

"solace.dev/go/messaging-trace/opentelemetry/test/sempclient/monitor"
"solace.dev/go/messaging-trace/opentelemetry/test/testcontext"
"solace.dev/go/messaging/pkg/solace"
"solace.dev/go/messaging/pkg/solace/config"
"solace.dev/go/messaging/trace/propagation/test/sempclient/monitor"
"solace.dev/go/messaging/trace/propagation/test/testcontext"

//lint:ignore ST1001 dot import is fine for tests
. "github.com/onsi/ginkgo/v2"
Expand Down
6 changes: 3 additions & 3 deletions test/helpers/resource_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
package helpers

import (
sempconfig "solace.dev/go/messaging/trace/propagation/test/sempclient/config"
"solace.dev/go/messaging/trace/propagation/test/sempclient/monitor"
"solace.dev/go/messaging/trace/propagation/test/testcontext"
sempconfig "solace.dev/go/messaging-trace/opentelemetry/test/sempclient/config"
"solace.dev/go/messaging-trace/opentelemetry/test/sempclient/monitor"
"solace.dev/go/messaging-trace/opentelemetry/test/testcontext"

//lint:ignore ST1001 dot import is fine for tests
. "github.com/onsi/gomega"
Expand Down
4 changes: 2 additions & 2 deletions test/helpers/semp_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package helpers
import (
"time"

"solace.dev/go/messaging/trace/propagation/test/sempclient/config"
"solace.dev/go/messaging/trace/propagation/test/testcontext"
"solace.dev/go/messaging-trace/opentelemetry/test/sempclient/config"
"solace.dev/go/messaging-trace/opentelemetry/test/testcontext"
)

// Our generated SEMPv2 client has **bool as the datatype for booleans to be able to differentiate between "missing" and "false"
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/toxic_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package helpers
import (
"fmt"

"solace.dev/go/messaging-trace/opentelemetry/test/testcontext"
"solace.dev/go/messaging/pkg/solace/config"
"solace.dev/go/messaging/trace/propagation/test/testcontext"

//lint:ignore ST1001 dot import is fine for tests
. "github.com/onsi/ginkgo/v2"
Expand Down
2 changes: 1 addition & 1 deletion test/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"sync"
"testing"

"solace.dev/go/messaging-trace/opentelemetry/test/testcontext"
"solace.dev/go/messaging/pkg/solace/logging"
"solace.dev/go/messaging/trace/propagation/test/testcontext"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
Loading

0 comments on commit f8fa274

Please sign in to comment.