* feat(ci): Add codespell to Makefile and GitHub Actions
This is a followup from
https://github.com/open-telemetry/opentelemetry-go/pull/3980 to add the
automation for checking for code spelling errors to a different PR.
[Codespell][] makes use of the `.codespellrc` file automatically as a config
file for convenience. The configuration file specifies directories and
flags to pass to `codespell`. Codespell also makes use of the
`.codespellignore` file to ignore certain word spellings.
There is a new section in `Makefile` for installing python tooling.
It is similar to how the go tools are installed. It sets up a virtualenv
in `venv `and installs python tooling there if it hasn't been installed
yet.
The new [codespell workflow][] will run in pull requests to annotate
misspelled words. It is set up to only warn the user with annotations in
the pull request if there are typos, but we can fail the pull request as
well if we want to by deleting the [warn_only][] key.
[codespell]: https://github.com/codespell-project/codespell
[codespell workflow]: https://github.com/codespell-project/actions-codespell
[warn_only]: https://github.com/codespell-project/actions-codespell#parameter-only_warn
* Use docker to run python and codespell
Since this is a Go project, having a dependency on python seemed
disconcerting. So, docker is used to create a virtual environment
with a python image and also run the tools that were installed.
* Remove wording on requirement for python
* Apply suggestions from code review
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Pin versions into requirements.txt
* Pin version in requirements.txt
* Fix typo in license
* Revert typo fix on deleted file
* Update .github/workflows/codespell.yaml
Co-authored-by: Robert Pająk <pellared@hotmail.com>
* Update codespell.yaml
* Update codespell.yaml
---------
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
* Update the website getting started docs
Add a new example, fib, that contains an application for the computation
of Fibonacci numbers. Use this example to update the website getting
started documentation.
* Revise docs english
* Update example/fib/go.mod
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Add a What's Next section
* Clean up intro
* Apply suggestions from code review
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* Apply feedback
* Return from Poll on error
* Update website_docs/getting-started.md
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Add root and parent relationship info
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
* Push->basic
* Repackage
* Rename away from push
* Make exporter optional; export from a separate goroutine
* Move pull_test into controller_test
* Precommit pass
* New OTLP/Prom example
* Precommit
* Fix the example
* Shorten the example
* Test starting controller w/o exporter
* Test export timeout
* Remove ancient example & lint
* go.mod revert & tidy
* Comments
* Tidy a diff
* Tidy a diff
* Move export kind selector in the new example
* Split this test into its original parts
* Reduce diff size
* Changelog
* Remove extra Add/Done pair
* Remove unused stopCh param; document the Stop behavior
* Typo
* Use ctx
* Missed v0.15
* Apply PR feedback
* Precommit pass
* 0.14 -> 0.15 in new file
* Remove diff chunk markers
* Fix OTLP example
* Upstream
* dashpole comments
* aneurysm9 feedback
* Tidy go.sum
* Import open-telemetry/opentelemetry-proto submodule under internal
* Commit changes in updated/new protobuf files
* Refer to new location of .pb.go files after rewrite from import
* Describe in CHANGELOG
* Add zipkin exporter
The zipkin exporter implements the SpanBatcher interface. It follows
the current-at-the-time-of-writing document about conversion from
OpenTelemetry span data to Zipkin spans. Which means that endpoint
information is not yet filled.
* Fix typo in docs
* Add a zipkin example
This sends span information to a locally running zipkin collector.
Currently I have a problem getting the collector to show me the spans
after accepting them with HTTP 202. Not sure if this is because of
missing endpoint information.
* Make gitignore consistent
The fixed paths should be prefixed with a slash. The "relative" paths
mean that git will ignore all the files that end with the path.
* Add tests for zipkin exporter
Change all occurrences of value to pointer receivers
Add meta sys files to .gitignore
Code cleanup e.g.
- Don't capitalize error statements
- Fix ignored errors
- Fix ambiguous variable naming
- Remove unnecessary type casting
- Use named params
Fix#306
* automate building all the examples
the EXAMPLES variable was out of date - the stackdriver example wasn't
even built
let's automate it, so we don't need to remember about updating the
variable after adding a new example to the examples directory
* move jaeger example to example directory
this should be in the examples directory, so it can be built by the
make test during CI.
* switch to go 1.13
circle ci uses go 1.12 (which is the oldest 1.12 release) that
contains some bugs with module handling
let's switch to go 1.13.3, the latest go currently
* use a single valid revision of the project in go.mod files
this probably shouldn't be a problem since the switch to go 1.13 in
circle ci, but cleans up the mess and the use of bogus releases
* move bridge out of the experimental directory
* drop a leftover from experimental stuff in gitignore
found by accident when doing `git grep experimental`.
* Remove globals from exp/streaming
* basic example
* Build the streaming example
* Update README.md for running streaming example
* Remove observer package
* Move observer to exporter
* Fix
* Re-run make circle-ci
* fix compile errors.
* fix lint errors.
* add circle-ci job.
* rename IDHigh to TraceIDHigh
* rename the file.
* add go get for goimports and golangci-lint
* enable GO111MODULE and remove comments.
* remove working dir and update cache name
* Add TEST_RESULT env back.
* run go mod tidy.
* remove go mod download.
* add test coverage.
* fix TraceID.
* fix circlefi config error.
* remove install-tools.
* remove ALL_TEST_SRC from Makefile.
goimports for import rewritting
golangci-lint as the configurable linting swiss army knife.
These tools are recorded in [tools.go](https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module). This records
them as a dependency to make sure we're all using the same tool versions.
To make sure this project's tool's versions don't stomp over versions
from other projects, they are installed in ./.tools, which is
.gitignored.
goimports was run and fixed up a single file:
plugin/httptrace/httptrace.go
I prefer to group local packages below external packages, hence the use
of goimports -local option.
.golangci.yml contains nothing but an incomplete set of defaults ATM.
I expect those to change over time though. ;-)
To use, run:
$ make precommit
Fixes#15