Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.0 release #2

Merged
merged 50 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
ebc9cde
feat[SOL-103590]: Golang: Set up initial plumbing code and structure …
oodigie Nov 1, 2023
e00aff5
feat[SOL-102584]: Implement New go module for Go api otel integration
oodigie Nov 1, 2023
a8f3dc7
feat[SOL-103589]: Implement the standalone instrumentation go module …
oodigie Nov 1, 2023
c94641c
feat: commited the go.mod file for this module
oodigie Nov 1, 2023
61b7458
refactor: renamed the implementation package from propagation to impl…
oodigie Nov 2, 2023
819cf8e
feat: added the tests for the module
oodigie Nov 10, 2023
106092a
chore: updated the README.md for the test package
oodigie Nov 10, 2023
163978b
SOL-103071: [Integration]Create Git actions to run tests in new Otel …
oodigie Nov 10, 2023
a0a3b6d
feat: untracked the generated files in the sempclient directory
oodigie Nov 10, 2023
b57b038
feat: fixed the failing tests and minor refactoring
oodigie Nov 10, 2023
444cfeb
feat[SOL-106902]: solace.dev/go/trace/propagation has a circular depe…
oodigie Nov 11, 2023
91cb9a5
Cre 1293 otel go ci (#2)
seankoneill Nov 14, 2023
0d611e7
point jpl back at dev branch
seankoneill Nov 14, 2023
e4acbbe
test[SOL-102585]: Implement unit and integration tests for the go ote…
oodigie Nov 14, 2023
7924b5f
fix[SOL-107285]: Trace flags set to 0x11 causes context to not be ext…
oodigie Nov 14, 2023
8aefbf1
Merge branch 'feat/implement-otel-integration-module' of https://gith…
oodigie Nov 14, 2023
c878045
feat: merged build files into branch
oodigie Nov 14, 2023
20cf47b
refactor: updated the import replacement paths in the go.mod files
oodigie Nov 14, 2023
41c1c42
refactor: fixed the two failing static checks
oodigie Nov 14, 2023
bac5db8
ci: Complete CI. Point jpl @ main, remove dependabot branch target
seankoneill Nov 15, 2023
f401644
test: fixed the failing test
oodigie Nov 16, 2023
c355358
Merge branch 'feat/implement-otel-integration-module' of https://gith…
oodigie Nov 16, 2023
e2493b5
chore: added the changes in the go.sum files
oodigie Nov 16, 2023
13b767d
test: fixed failing test on build machine
oodigie Nov 16, 2023
21092c4
test: fixed failing test on build machine
oodigie Nov 16, 2023
3a9fed9
chore: bumped up the test version of the solace/messaging dependency
oodigie Nov 22, 2023
d5a13e5
fix: fix for an unstable test
oodigie Nov 22, 2023
0f22679
feat[SOL-108209]: Go: PubSub+ OpenTelemetry Integration API for Go na…
oodigie Nov 24, 2023
f6e3c4b
build[SOL-108209]: Go: PubSub+ OpenTelemetry Integration API for Go n…
oodigie Nov 24, 2023
bff8ee9
feat: improved the logger so it works with the different log levels w…
oodigie Nov 24, 2023
f3fe892
refactor: renamed the propagation directory to carrier and updated it…
oodigie Nov 29, 2023
1cb6337
refactor: renamed the propagation directory to carrier and updated it…
oodigie Nov 29, 2023
7c26c23
Add dependabot on main
seankoneill Nov 10, 2023
f2ddeb1
SOL-64940: Merged main integration branch dev to feature branch
cjwmorgan-sol Jan 11, 2024
a541fd6
feat: updated the required supported Go version and some refactoring
oodigie Jan 14, 2024
282ebc2
SOL-110599: Update Copyright Notices to 2024 in PubSub+ Opentelemetry…
oodigie Jan 15, 2024
fd5a9b2
refactor: removed the unnecessary TODO comments and fixed indentation
oodigie Jan 17, 2024
1ff1989
feat: refactored and cleaned up the integration tests
oodigie Jan 17, 2024
fd15a43
refactor: more refactoring to remove unnecessary test configs
oodigie Jan 17, 2024
9824d6b
refactor: refactored the codebase to fix the duplicated carrier impl …
oodigie Jan 17, 2024
843d274
chore: bumped the minimum go version from 1.17 to 1.20 in the Jenkins…
oodigie Jan 17, 2024
3d9d65f
chore: bumped the static check package to 0.4.6 to be compatible with…
clarkbains Jan 18, 2024
e24fba3
Merge pull request #3 from SolaceDev/feat/implement-otel-integration-…
cjwmorgan-sol Jan 18, 2024
b395063
Update pubsubplus-go-client api reference to version v1.5.0
cjwmorgan-sol Jan 23, 2024
a9e4969
Update pubsubplus-go-client version reference to version v1.5.0 for t…
cjwmorgan-sol Jan 23, 2024
e5847a4
refactor: renamed the package root and updated all references within …
oodigie Jan 29, 2024
e25e4d0
chore: renamed references for the propagation to match new root for p…
oodigie Jan 29, 2024
f8fa274
Merge pull request #4 from SolaceDev/SOL-103380-rename-package-root
cjwmorgan-sol Jan 30, 2024
758b6d5
SOL-111959: Update license file for PubSub+ Opentelemetry Integration…
oodigie Jan 31, 2024
5e25564
Merge pull request #5 from SolaceDev/SOL-111959-update-license-file
cjwmorgan-sol Jan 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: daily
63 changes: 63 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Test

# Controls when the workflow will run
on: [push, pull_request, workflow_dispatch]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Linux:
# The type of runner that the job will run on
runs-on: ubuntu-20.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: 'stable'
check-latest: true

- name: Compiles
run: |
go mod tidy
go build ./...

- name: Runs go fmt
if: ${{ success() }}
run: |
OUTPUT=$(go fmt ./... 2>&1)
if [ ! -z "$OUTPUT" ]; then
echo "go fmt failed on the following files:"
echo "$OUTPUT"
exit 1
fi
- name: Runs unit tests
if: ${{ success() }}
run: go test -coverprofile ./unitcoverage.out ./...

- name: Generates the SEMPv2 client
if: ${{ success() }}
run: |
go generate .
working-directory: ./test/sempclient

- name: Runs the integration tests
if: ${{ success() }}
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/opentelemetry/internal/...,solace.dev/go/messaging-trace/opentelemetry/... -tags enable_debug_logging
working-directory: ./test

- name: Uploads artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
path: |
./unitcoverage.out
./test/reports/report.xml
./test/reports/coverage.out
./test/diagnostics.tgz
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,27 @@

# Go workspace file
go.work

.DS_STORE

.vscode

# Removing the commented out includes
# lib/*/bin*
# lib/*/lib*
# lib/*/include*

test/reports
test/diagnostics.tgz

test/sempclient/action/*
!test/sempclient/action/go.mod
!test/sempclient/action/go.sum

test/sempclient/config/*
!test/sempclient/config/go.mod
!test/sempclient/config/go.sum

test/sempclient/monitor/*
!test/sempclient/monitor/go.mod
!test/sempclient/monitor/go.sum
77 changes: 77 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

65 changes: 65 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
## How to Contribute to a Solace Project

#### **Did you find a bug?**

* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/SolaceProducts/pubsubplus-opentelemetry-go-integration/issues).

* If you're unable to find an open issue that addresses the problem, [open a new one](https://github.com/SolaceProducts/pubsubplus-opentelemetry-go-integration/issues/new). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.

#### **Did you write a patch that fixes a bug?**

* Open a new GitHub pull request with the patch.

* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.

#### **Do you intend to add a new feature or change an existing one?**

* Open a GitHub [enhancement request issue](https://github.com/SolaceProducts/pubsubplus-opentelemetry-go-integration/issues/new) and describe the new functionality.

#### **Do you have questions about the source code?**

* Ask any question about the code or how to use Solace PubSub+ OpenTelemetry Integration API in the [Solace community](https://solace.dev/community/).

## Developer Guide

### Overview

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. It has a dependency on the [Solace PubSub+ Messaging API for Go](https://docs.solace.com/API/Messaging-APIs/Go-API/go-home.htm).

### Repository Contents

The following are the directories that are part of the repository:
- `./`: contains the API's main entrypoints such as tracing.
- `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

There are a handful of prerequisites for developing the Solace PubSub+ OpenTelemetry Integration API for Go:
- Golang version 1.17+
- A golang enabled code editor, preferably with format on save
- https://github.com/fatih/vim-go
- https://code.visualstudio.com/docs/languages/go
- (optional) Docker used for testing
- (optional) Godoc Static to generate a static version of the documentation

Note:
- The integration tests are their own go module. This is currently not compatible with the [go language server](https://github.com/golang/tools/blob/master/gopls/README.md) which is the default used in VS Code. In particular, there is only support for a single module per workspace. The solution to this is to open the tests in their own workspace.

### Testing

Any new features added to the API must have corresponding tests added to the [integration test project](./test). See [the test README](./test/README.md) for details on running the tests. Any new feature must not decrease overall test coverage.

#### Github Actions

The integration tests are run on every new commit via Github Actions. These tests are run on the latest Go version on Linux.

### Generating Documentation

Documentation should work in all cases using `godoc` in the module and navigating to the local webserver.

#### Generating Static Documentation

In addition, static documentation can be generated. To do this, first install godoc-static, and then run `go run docs-templates/generate_documentation.go`.
50 changes: 50 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// pubsubplus-opentelemetry-go-integration
//
// Copyright 2021-2024 Solace Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// The following is an internal infrastructure file for building
properties([
buildDiscarder(logRotator(daysToKeepStr: '30', numToKeepStr: '10')),
])
currentBuild.rawBuild.getParent().setQuietPeriod(0)

library 'jenkins-pipeline-library@main'

/*
Go Version examples:
auto-v1.17.x: Latest patch of 1.17 release
auto-v1.17.2: Specific patch of 1.17 release
auto-v1.17.0: First release of 1.17 (Despite go versioning this as 1.17)
auto-latest: Most recent patch version of latest minor release
auto-previous: Most recent patch version of previous minor release
auto-2previous: Most recent patch version of second last minor release

Adoption of new versions into these may be delayed.
*/

builder.goapi([
"buildCheckGoVer": 'auto-v1.20.0',
"validationGoVer": 'auto-v1.20.0',
"staticCheckPkg": 'honnef.co/go/tools/cmd/[email protected]',
"getTestPermutations": {
List<List<String>> permutations = []
for (platform in [builder.LINUX_ARM, builder.LINUX_X86_64, builder.LINUX_MUSL, builder.DARWIN_X86_64, builder.DARWIN_ARM]) {
for (gover in ['auto-latest', 'auto-previous']) {
permutations << [platform, gover]
}
}
return permutations
}
])
Loading
Loading