1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-10 09:50:58 +02:00
Commit Graph

19 Commits

Author SHA1 Message Date
Tyler Yahn
271df1dc01
Add Version func to otel/sdk (#3949)
* Add Version func to otel/sdk

* Update sdk/resource to use sdk version

* Remove unused UserAgent from sdk/internal

* Add changes to changelog

* Update CHANGELOG.md

Co-authored-by: Robert Pająk <pellared@hotmail.com>

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2023-03-30 12:49:39 -07:00
Robert Pająk
d0e4a438ef
Handle empty env vars as it they were not set (#3764)
* Handle empty env vars as it they were not set

* Add changelog entry

* Add missing unit test
2023-02-28 12:43:48 -08:00
Tyler Yahn
1f5b159161
Use already enabled revive linter and add depguard (#2883)
* Refactor golangci-lint conf

Order settings alphabetically.

* Add revive settings to golangci conf

* Check blank imports

* Check bool-literal-in-expr

* Check constant-logical-expr

* Check context-as-argument

* Check context-key-type

* Check deep-exit

* Check defer

* Check dot-imports

* Check duplicated-imports

* Check early-return

* Check empty-block

* Check empty-lines

* Check error-naming

* Check error-return

* Check error-strings

* Check errorf

* Stop ignoring context first arg in tests

* Check exported comments

* Check flag-parameter

* Check identical branches

* Check if-return

* Check increment-decrement

* Check indent-error-flow

* Check deny list of go imports

* Check import shadowing

* Check package comments

* Check range

* Check range val in closure

* Check range val address

* Check redefines builtin id

* Check string-format

* Check struct tag

* Check superfluous else

* Check time equal

* Check var naming

* Check var declaration

* Check unconditional recursion

* Check unexported return

* Check unhandled errors

* Check unnecessary stmt

* Check unnecessary break

* Check waitgroup by value

* Exclude deep-exit check in example*_test.go files
2022-05-19 15:15:07 -05:00
Tyler Yahn
fdfc821bac
Add godot linter to golangci (#2845)
Comment should be complete sentences outside of lists with sentence
fragments. This adds the godot linter to check these complete sentences
end with punctuation. If they do not, running fix will append a period.
2022-04-25 13:22:49 -07:00
Tyler Yahn
b1c1e781e6
Support general attribute limits for spans (#2677)
* Support general attribute limits for spans

When model specific limits are not set fallback to the general ones
defined by environment variables before defaults for attribute length
and count limits. This is in compliance with the specification.

* Update env pkg unit tests

Test all environment variable helper functions.

* Add changes to changelog

* Update firstInt doc
2022-03-16 14:33:59 -07:00
Tyler Yahn
0d0a7320e6
Update span limits to comply with specification (#2637)
* PoC for span limit refactor

* Rename config.go to span_limits.go

* Add unit tests for truncateAttr

* Add unit tests for non-string attrs

* Add span limit benchmark tests

* Fix lint

* Isolate span limit tests

* Clean span limits test

* Test limits on exported spans

* Remove duplicate test code

* Fix lint

* Add WithRawSpanLimits option

* Add test for raw and orig span limits opts

* Add changes to changelog

* Add tests for span resource disabled

* Test unlimited instead of default limit

* Update docs

* Add fix to changelog

* Fix option docs

* Do no mutate attribute

* Fix truncateAttr comment

* Remake NewSpanLimits to be newEnvSpanLimits

Update and unify documentation accordingly.

* Update truncateAttr string slice update comment

* Update CHANGELOG.md

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2022-03-03 07:56:07 -08:00
Will Li
98c2c9d96c
Add env support for span limits configuration (#2606)
* add env support for otel_span configuration

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* update changelog

* update changelog and some logic based on comment

* Update CHANGELOG.md

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>

* add document about retrieve value from environment variable

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* remove trailing whitespace

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* parse environment variable before apply the options

* Update CHANGELOG.md

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

* Update sdk/trace/provider_test.go

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

* Update CHANGELOG.md

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-02-17 08:21:13 -08:00
Tyler Yahn
b60d53d316
Unexport EnvBatchSpanProcessor* constants (#2583)
* Move BSP env support to internal

* Use pkg name

* Update env test

* Use internal/env in sdk/trace
2022-02-07 07:57:44 -08:00
Tyler Yahn
6e549fe974
Remove unused sdk/internal/santize (#2549) 2022-01-26 13:27:59 -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
Krzesimir Nowak
3d6e8b5078
Move Version function and code from global to toplevel (#1330)
* Move global code to toplevel package

* Move version function to toplevel package

* Update changelog

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-11-16 09:30:54 -08:00
Tyler Yahn
577b21745b
Update codes to match specification (#1214)
* Update codes to match specification

* Add changes to changelog

* go mod tidy

* Add unit tests for codes

* Update SetStatus methods to only filter Unset

* Update apitest code being tested
2020-10-05 11:36:03 -07:00
Tyler Yahn
efd4e3a383
Remove google.golang.org/grpc/codes dependency from API by adding an equivalent codes package (#1046)
* Add otel/codes package to replace google.golang.org/grpc/codes

* Replace google.golang.org/grpc/codes with otel/codes

* Update opentracing bridge to use OTel codes

* Update semconv to use OTel codes

* Update SDK to convert from OTel codes to gRPC

* go mod tidy

* Add change to CHANGELOG

* Fix word from feedback
2020-08-10 09:17:09 -07:00
ET
34bd998963
Remove internal StateLocker implementation (#688)
Fixes #657

With the changes in #667 and #669 to use a plain-old-mutex for
concurrent access of Histogram and MinMaxSumCount aggregators,
the StateLocker implementation is no longer used in the project.

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-04-30 14:15:04 -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
Tyler Yahn
a485d0ec64
Update License header for all source files (#586)
* Update License header for all source files

- Add Apache 2.0 header to source files that did not have one.
- Update all existing headers dated to 2019 to be 2020
- Remove comma from License header to comply with the Apache 2.0
  guidelines.

* Update Copyright notice

Use the standard Copyright notices outlined by the
[CNCF](https://github.com/cncf/foundation/blob/master/copyright-notices.md#copyright-notices)
2020-03-23 22:41:10 -07:00
Gustavo Silva Paiva
288821cd22
Make histogram aggregator checkpoint consistent (#438)
* change the histogram aggregator to have a consistent but blocking Checkpoint()

* docs

* wrapping docs

* remove currentIdx from the 8bit alignment check

* stress test

* add export and move lockfreewrite algorithm to an external struct.

* move state locker to another package.

* add todos

* minimal tests

* renaming and docs

* change to context.Background()

* add link to algorithm and grammars

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-03-11 11:12:23 -07:00
rghetia
15bfc5bb12
Namespace import path under "/otel" (#274)
Also fixes example module paths so that they use the vanity URL instead
of the github URL.

[Closes #184]
2019-11-01 11:40:29 -07:00
rghetia
0f32efcdaa
Trace sdk (#65)
* trace sdk initial commit.

* fix imports and comments.

* remove tracestate

* split trace.go

* add attribute over limit test.

* add comments and restructure span.go and tracer.go

* refactor MessageEvent

* defer unlock

* some more cleanup in span.go

* rename *MessageEvent* to *Event*

* cleanup comments in trace_test.go

* fix typos.

* return full string ID for traceID and spanID.
2019-08-02 13:52:55 -07:00