Commit Graph

8 Commits

Author SHA1 Message Date
Pablo Baeyens 8bea0d372c
[featuregate] Validate arguments to `Register` (#8766)
**Description:**
- Validate Gate IDs: ids must be alphanumeric with dots. At a minimum we
have to disallow `,` to avoid ambiguity in the CLI, but I am being
intentionally more restrictive here
- Validate URLs: we check that a valid URL can be built from it using
the `net/url` stdlib package
- Validate versions: we check that a valid version is passed to the
`To/FromVersion` options using hashicorp's libraries and also that the
implicit version range, when defined, is not empty.

This does not change the public API types, it only adds validation.

Relates to #8220

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
Co-authored-by: Alex Boten <aboten@lightstep.com>
2023-11-07 13:28:59 +01:00
Alex Boten 80d704deb4
[chore] use license shortform (#7694)
* [chore] use license shortform

To remain consistent w/ contrib repo, see https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/22052

Signed-off-by: Alex Boten <aboten@lightstep.com>

* make goporto

Signed-off-by: Alex Boten <aboten@lightstep.com>

---------

Signed-off-by: Alex Boten <aboten@lightstep.com>
2023-05-18 13:11:17 -07:00
Tyler Helmuth 68932a0e77
[featuregate] Removed deprecated functions (#7587) 2023-05-01 15:34:54 -07:00
Bogdan Drutu 884cdc5b1d
featuregate: Add deprecated Stage and to/from versions (#7484)
Fixes 2 out of the 3 tasks in https://github.com/open-telemetry/opentelemetry-collector/issues/7043

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-04-04 08:43:34 -07:00
Kshitij Patil 5c58fb38e4
replacing go.uber.org/atomic by sync/atomic (#7220)
replacing go.uber.org/atomic by sync/atomic
wrt issue #7160
2023-03-05 12:24:52 -08:00
Bogdan Drutu ce95f577bb
Reduce contention in featuregate by using sync.Map instead of mutex. (#6980)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2023-01-19 15:16:54 -08:00
Alex Boten 5a78d05ae3
[featuregate] remove deprecated func (#6594)
* [featuregate] remove deprecated func

Signed-off-by: Alex Boten <aboten@lightstep.com>

* update changelog

Signed-off-by: Alex Boten <aboten@lightstep.com>
2022-11-21 14:53:49 -08:00
Bogdan Drutu 65152ee7dd
Deprecate Get prefix funcs for featuregate.Gate (#6528)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-11-11 14:21:48 -08:00