21 Commits

Author SHA1 Message Date
Pires
4942ea59a7 build: adopt Go 1.23 and bump linter 2025-01-08 10:59:24 +00:00
Heba Elayoty
077ee93fa2 fix: Fix opentelemetry dependencies issues (#1122)
Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
2023-06-15 18:23:16 -07:00
Brian Goff
70848cfdae Bump k8s deps to v0.24
This requires dropping otel down to v0.20 because the apiserver package
is importing it and some packages moved around with otel v1.
Even k8s v0.25 still uses this old version of otel, so we are stuck for
a bit (v0.26 will, as of now, use a newer otel version).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-10-07 23:21:47 +00:00
yabuchan
38e662129d remove warning from golinter 2022-07-08 10:23:17 +09:00
yabuchan
95bdbdec0d reflect review comments 2022-07-08 00:18:58 +09:00
yabuchan
36397f80c2 downgrade opentelemetry to avoid the library conflicts 2022-07-04 19:15:45 +09:00
yabuchan
801b44543c do not save attributes in logger, add fake logger in unit test 2022-07-04 13:52:51 +09:00
yabuchan
853f9ead1c add sampler in test 2022-07-04 00:22:57 +09:00
yabuchan
915445205f add logic for otel 2022-07-03 23:30:10 +09:00
Sargun Dhillon
d29adf5ce3 Add Gocritic
This also fixes the issues laid out by gocritic
2020-12-06 13:20:03 -08:00
Sargun Dhillon
ffbfe19e78 Add tests for opencensus (logger) fields 2020-12-06 13:20:03 -08:00
Sargun Dhillon
d64d427ec8 Enable all linters by default
This removes the directive from .golangci.yml to disable all linters,
and fixes the relevant bugs / issues that are exposed.
2020-12-03 11:33:06 -08:00
Uzuku
f80f823e8b Fix log format
Correctly expand the log args
2019-09-28 01:54:46 +08:00
jerryzhuang
0ba0200067 fix several typo
Signed-off-by: zhuangqh <zhuangqhc@gmail.com>
2019-07-17 10:36:17 +08:00
Brian Goff
f6be3ce713 Allow setting tracer in the context. (#672)
Allows people to avoid setting a global if they don't want to.
2019-06-20 07:33:16 +01:00
Brian Goff
bd742d5d99 Add license details on file heads. (#665)
Realized as I was starting to copy some stuff to other repos that we
should go ahead and add this.
2019-06-13 10:13:14 -07:00
Brian Goff
a54753cb82 Move around some packages (#658)
* Move tracing exporter registration

This doesn't belong in the library and should be configured by the
consumer of the opencensus package.

* Rename `vkublet` package to `node`

`vkubelet` does not convey any information to the consumers of the
package.
Really it would be nice to move this package to the root of the repo,
but then you wind up with... interesting... import semantics due to the
repo name... and after thinking about it some, a subpackage is really
not so bad as long as it has a name that convey's some information.

`node` was chosen since this package deals with all the semantics of
operating a node in Kubernetes.
2019-06-12 13:11:49 +01:00
Brian Goff
d6b5ae3710 Remove usage of ocstatus package
This changes the tracing package to accept an error on SetStatus, which
is really what we always want anyway.
This also decouples the trace package from opencensus.
2019-06-04 14:29:25 -07:00
Brian Goff
02623170cc Use errdefs package 2019-06-04 14:29:23 -07:00
Brian Goff
8d0b843ae4 Refactor CLI initialization (#562)
This cleans up the CLI code significantly.
Also makes some of this re-usable for providers who want to do so.

This also removes the main.go from the top of the tree of the repro,
instead moving it into cmd/virtual-kubelet.
This allows us to better utilize the package namespace (and e.g. mv the
`vkubelet` package to the top of the tree).
2019-04-19 17:02:39 -07:00
Brian Goff
1bfffa975e Make tracing interface to coalesce logging/tracing (#519)
* Define and use an interface for logging.

This allows alternative implementations to use whatever logging package
they want.

Currently the interface just mimicks what logrus already implements,
with minor modifications to not rely on logrus itself. I think the
interface is pretty solid in terms of logging implementations being able
to do what they need to.

* Make tracing interface to coalesce logging/tracing

Allows us to share data between the tracer and the logger so we can
simplify log/trace handling wher we generally want data to go both
places.
2019-02-22 11:36:03 -08:00