1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-11-30 08:46:54 +02:00
Commit Graph

58 Commits

Author SHA1 Message Date
Tyler Yahn
d46c0d2e36
Add dependabot-generate make target (#2613)
* Refactor common repo code for crosslink

* Add dbotconf utility

* Add dependabot-generate target to Makefile

* Generate dependabot.yml

* Update Makefile targets related to dependabot-generate
2022-02-17 07:45:10 -08:00
Tyler Yahn
cd21df42c4
Refactor development/CI tooling (#2609)
* Refactor Makefile

* Update dependabot targets

* Sync github actions config with Makefile ci target

* Update test targets

* Use sed instead of parameter indexing

* Remove dependabot-generate

Address in #2613 instead.
2022-02-15 14:03:38 -08:00
Aaron Clawson
05c4f109e4
Add Porto to dependancy list. (#2369) 2021-11-09 08:15:04 -08:00
Pablo Baeyens
19294aab4c
Add vanity imports to internal packages (#2280)
* `porto -w --include-internal .`

* Bump `porto` to 0.4.0 and include internal files

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-10-29 09:34:37 -07:00
Anthony Mirabella
737275271d
Release prep v1.0.1/v0.24.0 (#2270)
* Update build tools

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update CHANGELOG and versions.yaml

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Prepare stable-v1 for version v1.0.1

* Prepare experimental-metrics for version v0.24.0

* Prepare bridge for version v0.24.0

* Update releasing documentation and create add-tags make target

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* use multimod from the .tools directory

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* precommit

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
2021-10-01 16:20:32 -04:00
José Carlos Chávez
099df58e4e
chore: adds vanity import check. (#2255)
* chore: adds vanity import check.

* chore: runs vanity import check on ci.

* fix: set right target on CI.

* fix: fixes install for porto.

* fix: install right proto bin.

* chore: list all files insides the tools directory.

* fix: fixes vanity import target

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* chore(vanity-imports): adds vanity import support.

* fix: fixes internal generation.

* chore: runs go mod tidy in tools.

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2021-09-27 22:37:26 -04:00
Robert Pająk
6da20a2727
Add cross-module test coverage (#2182)
* Add cross-module test coverage

* Update Makefile

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-08-14 08:10:15 -07:00
Anthony Mirabella
23cb939611
Remove internal/semconv-gen (#2155)
* Removed internal semconvgen

* fix Makefile and update releasing docs

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

Co-authored-by: Eddy Lin <elindy26@gmail.com>
2021-08-02 14:39:18 -04:00
Anthony Mirabella
c30cd1d0fd
Split stdout exporter into stdouttrace and stdoutmetric (#2005)
* Split stdout exporter into stdouttrace and stdoutmetric

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Remove unused options from stdouttrace and stdoutmetric exporters

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update stdout exporter references in website docs

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update docs to include correct import paths, properly describe exporter scope

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Remove pointless options to disable signals from what are now single-signal exporters

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
2021-06-16 11:32:42 -04:00
Tyler Yahn
3be9813d56
Deprecate the exporters in the "trace" and "metric" sub-directories (#1993)
* Rename exporters/metric/prometheus

* Rename exporters/trace/jaeger

* Rename exporters/trace/zipkin

* Fix dependabot config and make test

* Update README docs

* Deprecate exporters instead of remove them

* Update dependabot with old modules

* Run crosslink

* Add lint override for known deprecated pkg

* Update PR number
2021-06-12 11:39:22 -07:00
Anthony Mirabella
64b640cc26
Remove old OTLP exporter (#1990)
* Remove trace export support from exporters/otlp

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update otlp exporter example test to use metric/global package

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update CHANGELOG

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* completely excise exporters/otlp

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
2021-06-11 11:18:17 -04:00
Gustavo Silva Paiva
dfe2b6f143
OTLP trace gRPC exporter (#1922)
* draft: otlp exporter trace grpc

* address comments and improve usability

* change passthrough example to go 1.15

* code cleanups

* copy dependencies to `otlptrace`

* fix typo on makefile

* address comments

* update code with latest changes

* fix comments

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-05-27 13:47:01 -07:00
Anthony Mirabella
5cb6263624
Semantic Convention generation tooling (#1891)
* Add semantic convention generator

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update semantic conventions from generator

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Use existing internal/tools module

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Fix lint issues, more initialisms

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Update changelog

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* semconvgen: Faas->FaaS

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Fix a few more key names with replacements

* Update replacements from PR feedback

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* rename commonInitialisms to capitalizations, move some capitalizations there

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Regenerate semantic conventions with updated capitalizations and replacements

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Generate semantic conventions from spec v1.3.0

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Cleanup semconv generator util a bit

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* No need to put internal tooling additions in the CHANGELOG

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Fix HTTP semconv tests

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

* Add semconv generation notes to RELEASING.md

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
2021-05-12 19:10:56 -04:00
Tyler Yahn
76aa924e75
Fix the examples target info messaging (#1676)
The echo for the target was copied from other targets that use `dir` as
an iteration variable which is not what this target uses. That means
that the empty variable `dir` is unexpanded and the unhelpful message of
"build /..." is echoed. This updates the iteration variable to match
other targets and fixes the info messaging.
2021-03-08 11:59:41 -08:00
Tyler Yahn
712c3dccf8
Fix makefile ci target and coverage test packages (#1634) 2021-03-03 13:24:57 -05:00
Tyler Yahn
e25503a00e
Add compatibility tests to CI (#1567)
* Add compatibility tests to CI

* Increase timeout to 60s

Some of the aggregator tests are running just over 30 seconds when
testing on Windows. Bump this to allow for it.

* Remove cache setup jobs

Having a unified job setup the cache when none exists so packages are
only downloaded once is ideal, but these steps are taking too long. In
some situations they are doubling the run time. Remove them and prefer
to have multiple downloads when dependencies change.

* Add changes to changelog

* Remove mod-download target from Makefile

Unused now that the cache jobs are removed.

* Add compatibility testing table to changelog

* Add change about precommit to changelog

* Update README

* Correct examples target in lint job
2021-03-01 08:38:23 -08:00
Tyler Yahn
1307c91162
Remove vendor exclude from license-check (#1552)
* Update license-check to ignore all vendor dirs

* Remove vendor path exclude from license-check find
2021-02-22 08:26:04 -08:00
Punya Biswal
d7aff47338
Vendor Thrift dependency (#1551)
* Vendor Thrift dependency

* Fix build

* Changelog entry

* Ignore third_party for coverage purposes

* Re-run tests

* Re-run tests

* Re-run tests

* Re-run tests

* Relax time comparisons

Fixes #1559.

Some unit tests were flaking in CI because they expected the timestamp
to advance during a test, when it's possible for it to be unchanged
instead. This change switches the offending "<" comparisons to "<=".

* Re-run tests

* Relax more time comparisons

* Re-run tests

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-02-19 13:12:35 -05:00
Punya Biswal
9b242bc401
Organize API into Go modules based on stability and dependencies (#1528)
* Add a tool to auto-generate replace directives

* Auto-generated changes from previous commit

* Create new modules required for trace release

* otel/metric
* otel/trace
* otel/oteltest
* otel/sdk/export/metric
* otel/sdk/metric

Relates to #1467

* Move metric-related public API out of otel/ pkg

Move GetMeterProvider, Meter and SetMeterProvider to new package
otel/metric/global in the otel/metric module.

This will allow otel/ module to be released as v1.0.

* Include PR references in CHANGELOG

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* Check for root dir

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-02-12 08:23:51 -08:00
Krzesimir Nowak
66db2d845b
Build examples last (#1370)
Examples are "leaf" packages, that pull some other packages. So build
the other packages first to get and fix all the errors there, before
building the examples.
2020-12-01 08:02:36 -08:00
Joshua MacDonald
3a9f5fe15f
Test benchmarks in precommit (#1207)
* Fix the metric SDK benchmarks

* Test the benchmarks in precommit
2020-09-25 13:27:03 -07:00
Anthony Mirabella
2e221fdf3e
Move tools package under internal (#1141)
It is not user-facing, so there is no reason to leave it in an
importable location. Fixes #1126.
2020-09-09 09:14:03 -07:00
ET
440c4bd060
Stop find complaining due to missing directory starting point (#1116)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-09-02 07:40:03 -07:00
Tyler Yahn
3b3c263d9a
Update dependabot config (#1100)
Add check for github-actions.
Add missing examples and SDK go.mod
Remove redundant comments.
Change check to be weekly on Sunday to reduce load and churn.
Sort alphanumerically.
Add check to Makefile to ensure if there is a `go.mod` file there is a dependabot entry for that directory.
2020-08-26 16:34:41 -07:00
Bogdan Drutu
9907328c5b
Export coverage report to codecov (#995)
* Export coverage report to codecov

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

* Use orb and individual coverage files per module

* Run go cover inside module directory to account for local rewrites

Still try to upload using a single file, since orb docs seem to
indicate if you have more than one file, you're going to need to run
the orb multiple times.

* Use correct filename

* Don't do anything silly like appending a file to itself

* Handle subtle differences between FreeBSD and Linux

* Ignore opentelemetry-proto-gen files in exporters/otlp/internal

* Does codecov orb leave current directory in a bad state?

* Copy instead of move

* Ignore generated protobuf code in jaeger exporter module

Co-authored-by: Evan Torrie <evantorrie@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-24 09:43:29 -07:00
Tyler Yahn
8f9f2d84cf
Move OTLP to the OTLP exporter (#1050)
* Move proto to OTLP exporter

* Update OTLP exporter import of proto

* Use gogo protobuf

To stop using the deprecated github.com/golang/protobuf and match what
the collector is doing, switch to generating OTLP with the
github.com/gogo/protobuf/proto instead of
github.com/golang/protobuf/proto.

* Clean dependencies

Remove all protobuf dependencies from otel package and all of its
dependencies.

* Update CHANGELOG

* Clean OTLP exporter go mod

Remove submodule beforehand to avoid unneeded direct dependencies.

* Use default ref for GitHub workflow

* Update path that triggers proto gen action

* Correct license-check exclusion for OTLP

* Update commented location of the OTLP and code
2020-08-10 19:55:52 -07:00
ET
dd79483e20
Create protobuf generation GitHub action (#938)
* Add protogen workflow

* Move out protobuf generation to Makefile.proto

* Include in Changelog

* Update Makefile.proto

Move file-local mode variable to line by itself.

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-07-16 10:07:59 -07:00
Joshua MacDonald
27e892aad2
Remove -v from Go tests (#904)
Co-authored-by: Liz Fong-Jones <lizf@honeycomb.io>
2020-07-06 11:41:12 -04:00
Krzesimir Nowak
2aa6e9ff3d
Run generators in all submodules (#705) 2020-05-08 08:16:00 -07:00
Krzesimir Nowak
22653957f2
Bump golangci-lint again (#670) 2020-04-28 14:30:31 -04:00
Krzesimir Nowak
e21dfa28c6
Bump golangci-lint and work around the corrupting bug (#666)
* Bump golangci-lint to 1.25

* Skip the "unused" linter when running golangci-lint in --fix mode

This linter seems to provide bogus fix-up information to
golangci-lint, which results in file corruption instead of fixing the
issue. Since we are going to run the linter again anyway, but without
the --fix mode, skip the "unused" linter explicitly for the first run
- it will still have a chance to report errors on the second run.
2020-04-27 11:28:50 -07:00
Rahul Patel
f474c349ae
Script to verify example after new release. (#579)
* verify example.

* fix review comments.

* fix tools/go.*

* remove leftover exit.
2020-03-30 13:10:18 -07:00
Tyler Yahn
c97b4f726c
Update project License headers and checking (#596)
Update license header to standard format for source files missed prior.

Add license header to new source files.

Add Makefile check to test all `*.go` and `*.sh` files have a copyright
notice (or comment about them being auto-generated) within the first few
lines.
2020-03-25 14:47:17 -07:00
ET
c95360fc06
Run coverage over all packages beneath COVERAGE_MOD_DIR (#573)
This avoids any issue with tests that live outside the package in
which the code they're testing resides, e.g.
api/trace/b3_propagator.go
2020-03-20 10:07:47 -07:00
Rahul Patel
20ecc38919
skip test-386 for Mac OS 10.15.x (Catalina and upwards). (#521)
* skip test-386 for Mac OS 10.15.x (Catalina and upwards).

fixes #520

* fix indentation

* remove extra newlines.
2020-03-05 12:31:13 -08:00
Junki Kaneko
4818358f94
Move dependencies of tools package to a tools directory (#466)
* Move dependencies of tools package to a tools directory

* remove TOOLS_MOD_DIR from ALL_GO_MOD_DIRS in a Makefile.
then run 'go mod tidy' on ALL_GO_MOD_DIRS and TOOLS_MOD_DIR.

Co-authored-by: Rahul Patel <rghetia@yahoo.com>
2020-02-06 10:51:00 -08:00
Krzesimir Nowak
027855962b Some makefile fixes (#442)
* Generate and build before linting

Generated files may require some formatting that happens during
linting. Also missing generated files may result in linter failures.

Building can shake out any syntax/semantic errors and report them in a
much nicer way than the linter does. Which is exactly the reason the
build was running before linters before the Makefile simplification.

* Make stringer tool a dep of generate target, not lint

Lint target does not use the stringer utility - it is being used by go
generate.
2020-01-24 12:06:24 -08:00
rghetia
f0eb35b918
exclude example dirs from coverage test/report. (#365) 2019-12-02 23:58:53 -08:00
ferhat elmas
f25c84f35f Fix lint target (#360) 2019-11-27 23:20:33 -08:00
ferhat elmas
921ea03c0d Drop GO111MODULE environment variable (#359) 2019-11-27 16:29:56 -08:00
Isobel Redelmeier
e6d725626d Simplify Makefile (#354)
* Simplify Makefile

In particular, this change:
* Ensures that the race checker is always used for all tests
* Removes redundant commands
* Splits out `generate` and `lint` as their own commands
* Renames the `circle-ci` command to the more generic `ci`

* Use GOTEST_WITH_COVERAGE instead of old name

* Fix test-with-coverage command

* Fix test-386 command
2019-11-27 11:27:41 -08:00
Joshua MacDonald
799a4180bd
Fix race conditions in push_test.go (#340)
* Fix race conditions in push_test.go

* Add circle race test
2019-11-22 10:48:53 -08:00
Krzesimir Nowak
a2f3dcaf9a build all tests and run all tests too (#254)
golangci-lint runs its checks also on tests files, so make sure that
they build properly before running the linter. there is no obvious
solution to just build all the test without running them, so to work
that around, we specify a -run flag with a value that surely isn't
going to match any test function any time soon. that way we build all
the tests, but no test is run.

also, `go list ./...` returns only packages in the module, but no
packages within submodule, so exporter/trace/jaeger (which is a
submodule) was never on the list. so go test with those packages never
ran the jaeger trace exporter tests. fix this by visiting every
directory with the go.mod file and calling go test [options]
./... therein.
2019-10-30 10:09:18 -07:00
Krzesimir Nowak
cdf3f492d1 run go build on all modules to catch compilation errors (#250)
golangci-lint just issues an unreadable warning and quits with a
successful exit status on compilation error. just run a round of go
build ./... to catch those as hard errors.
2019-10-29 21:32:18 -07:00
Joshua MacDonald
937f4ff8b0
Metrics SDK work-in-progress (#172)
Introduce the new SDK, four aggregators, and an export interface.
2019-10-29 13:27:22 -07:00
Krzesimir Nowak
7d301220a2 Automate getting the list of examples to build (and switch to go 1.13 to avoid module problems) (#246)
* 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
2019-10-29 08:45:48 -07:00
Joshua MacDonald
0025ffcc71
Remove the experimental SDK (#221)
* Remove the experimental SDK

* Remove the experimental SDK from README.md

* Remove the experimental SDK from Makefile
2019-10-17 14:21:50 -07:00
Krzesimir Nowak
a936b8fb00 Add some docs about useful step before filing a PR (#151)
* Add a document about contributing

It is shamelessly stolen from opentelemetry-python and edited to be
relevant to opentelemetry-go. This file should explain some less
obvious things about the development of the project, like running
linters and regenerating the files.

* Force the use of go modules

Until go 1.13 modules were disabled by default if the repository was
inside GOPATH. This was causing issues when running `make precommit`
for the first time, as it could not find sources for any of the tools
used in `make precommit` under `${GOPATH}/src`. With setting the
`GO111MODULE` environment variable to `on`, we tell `go` to behave
differently, just like go 1.13 does by default.
2019-10-01 09:16:45 -07:00
Krzesimir Nowak
908b73d792 run golangci-lint in all directories with go.mod (#138)
* Run golangci-lint in all directories with go.mod

* Imports fix by golangci-lint

* Propagate failures from commands running in loops
2019-09-25 09:38:55 -07:00
Joshua MacDonald
a3ae50d8bc
Remove experimental/streaming globals, add streaming example (#135)
* 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
2019-09-23 14:39:10 -07:00