Commit Graph

31 Commits

Author SHA1 Message Date
Markus Thömmes 565516e224
Add errorlint and fix all existing issues (#1855) 2020-10-29 01:14:35 -07:00
Victor Agababov 2fd5431265
Downstream is updated, to remove outdated methods (#1856) 2020-10-27 12:23:33 -07:00
Victor Agababov 37583c54bf
Final Json -> JSON process (#1849)
I think there's no more
2020-10-26 16:25:41 -07:00
Markus Thömmes 385c8b9c0e
Fix nolint warnings and adhere to best practices (#1823) 2020-10-20 09:33:59 -07:00
Josh Soref b39d5da935
Spelling (#1797)
* spelling: adopted

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: aliased

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: apierrs

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: assignment

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: available

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: coexistence

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: commit

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: conversions

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: creates

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: custom

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: determine

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: different

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: distribution

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: duplicate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: editing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: endpoint

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: environment

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: generate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: implementation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: identified

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: ignore

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: indicates

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: interface

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: interleaved

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: labels

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: label

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: mimic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: namespaced

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: necessary

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: organization

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: populatable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: prometheus

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: refer

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: reference

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: repetitive

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: response

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: something

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: specable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: spoofing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: synchronized

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: this

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: trailing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unsupported

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: validation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* chore: reviewdog go header boilerplate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-10-18 14:22:57 -07:00
Francesco Guardiani 9e655c6b02
Port tracing setup code to pkg (#1807)
* Port setup code to pkg

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Moved prebuilt setups in config

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Removed maybe useless code

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Removed hardcoded configs and renamed defaultConfig() to NoopConfig()

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Applied suggestions

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Applied suggestions

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
2020-10-14 11:45:31 -07:00
Victor Agababov 7bad843466
Enable golint and exclude some other generated or additional dirs (#1783)
* Enable golint and exclude some other generated or additional dirs

Also remove `test` ignore, since it's covered by path ignore rule.

* meh

* fixes

* more

* progressing

* further

* like a boss
2020-10-07 14:58:20 -07:00
Victor Agababov a371418524
v2 (#1754) 2020-09-29 13:18:29 -07:00
Markus Thömmes 5fbbde31b3
Align linters with serving (enables stylecheck and asciicheck) (#1738) 2020-09-23 07:37:40 -07:00
Kenjiro Nakayama ba855eb0ac
Allow to specify service name and endpoint IP respectively for zipkin tracing (#1353)
* Allow to specify service name and hostPort for zipkin tracing

This patch allows to specify service name and hostPort for zipkin tracing.

Currently the serviceName(display in the console) and
hostPort(endpoint) must be same name.
To make matters worse, the hostPort only supports `80` port.

This patch allows to specify both serviceName and hostPort. Also,
hostPort can be `IP:PORT` format for port customization.

* Fix review comments

* Remove port
2020-08-03 10:35:02 -07:00
Markus Thömmes cb729b8ae6
Assorted linting fixes. (#1507)
- Remove unused code.
- Remove unnecessary conversion.
- Prevent copies of structs that contain sync.Mutex.
2020-07-16 05:59:33 -07:00
Victor Agababov eb05e8dd5b
Various cleanups (#1446)
Thanks @markusthoemmes for the tool :)
2020-06-24 14:04:28 -07:00
Adam Harwayne 5658d93fb0
Add tracecontextb3 HTTPFormats (#1429)
* Add a b3tracecontext.HTTPFormat.

It will utilize either B3 or TraceContext propagation formats coming in (preferring TraceContext) and while sending both.

* hack/update-deps.sh

* PR comments.

* Move to HTTPFormatSequence.

* Remove the struct.

* Allow distinct ingress and egress formats.
2020-06-23 10:35:27 -07:00
Markus Thömmes 60f4ae1dbe
Use config map parsing lib and enhance it further. (#1335)
* Use config map parsing lib and enhance it further.

* Unexport test struct values.

* Migrate tracing config too.

* Use sample-rate.
2020-05-18 10:42:06 -07:00
Victor Agababov 5ba6c1d101
Change %v to %w in errors and other nits (#1252)
* Change %v to %w in errors and other nits
Other are things I noticed when fixing the main %v->%w conversion

* fold
2020-04-27 15:04:51 -07:00
Francesco Guardiani edb546bf7a
Tracing configuration json marshal/unmarshal (#1228)
* Tracing configuration json marshal/unmarshal

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Suggestions

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
2020-04-22 08:53:40 -07:00
Victor Agababov 9147309d53
Properly productionize tracing config map (#1209)
- raise test coverage
- add validation for floats to be in the proper region
- normalize code around
2020-04-09 15:55:05 -07:00
Victor Agababov 2dab1c49bd
Normalize CM owners across CM directories (#1210)
Make sure they're uniform more or less.
Also add myself for CM approvers, given I've rewrote most of them recently.
2020-04-09 15:44:04 -07:00
mattmoor-sockpuppet 03caae6041 golang format tools (#669)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
/assign mattmoor
2019-09-12 08:28:33 -07:00
Adam Harwayne 6074a277ac ConfigOptions return an error (#657)
* ConfigOptions return an error, so we can react to things failing, rather than only reading it in the logs.

* Add unit tests.

* PR comments.

* PR comment - remove TODO.
2019-09-11 08:38:30 -07:00
mattmoor-sockpuppet ec03725bc7 golang format tools (#647)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
/assign mattmoor
2019-09-09 07:30:10 -07:00
Adam Harwayne e58c7a08d9 tracing.HTTPSpanMiddlewareIgnoringPaths (#617)
* Add tracing.HTTPSpanMiddlewareIgnoringPaths which will turn off tracing for the specified paths.

This is intended to allow us to ignore automated requests, such as liveness and readiness checks.

* PR comments.

* Rename HTTPSpanMiddlewareIgnoringPaths to HTTPSPanIgnoringPaths.
2019-09-06 15:08:05 -07:00
Belinda Vennam a9136e28d4 update with hostport (#614) 2019-08-28 19:12:43 -07:00
Victor Agababov 73863941e2 Fix the logger usage (#604) 2019-08-26 20:59:39 -07:00
Matt Moore 2a33038155 Expand the tracing package to support stackdriver. (#582)
* Expand the tracing package to support stackdriver.

This makes an assortment of changes to support the use of non-Zipkin tracing backends for publishing traces from system components based on config-tracing.

The changes to the config are modeled after config-observability, which already has support for prometheus and stackdriver backends for metrics.

* Incorporate review feedback.

* Incorporate feedback from @mdemirhan downstream
2019-08-20 18:52:32 -07:00
Matt Moore 9cc6a64541 Shuffle knative.dev/pkg/tracing code a bit (#581)
This moves around the code within the tracing package in preparation for adding support for other exporter options.

As the fields changed are all private, this should be a no-op for consumers of this package.

The goal of this change is to make it so that no files mention zipkin other than zipkin.go (or tests, which I left alone).
2019-08-19 18:50:02 -07:00
Victor Agababov 74c5d67ea0 Fix the issues pointed out by staticcheck (#541)
* Fix the issues pointed out by staticcheck

* review fix
2019-07-23 13:13:36 -07:00
Victor Agababov d5915547d9 Update opencensus to a newer version (#526) 2019-07-12 16:18:48 -07:00
mattmoor-sockpuppet 1864f499dc golang format tools (#497)
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
/assign @mattmoor
2019-06-27 07:37:08 -07:00
Matt Moore 222dd25986 Migrate pkg to use the knative.dev/pkg import path (#489)
* Manual changes.

* scripted changes.
2019-06-26 13:02:06 -07:00
Akash Verenkar c0f06c32f1 Move serving/pkg/tracing to pkg/tracing, so that eventing can start using it (#407)
* Move serving/pkg/tracing to pkg/tracing - initial version before testing

* Disabling TestInterlevedExporters. Refer to https://github.com/knative/pkg/issues/406
2019-05-08 11:43:37 -07:00