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

30 Commits

Author SHA1 Message Date
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
Tyler Yahn
92551d3933
Prerelease v1.0.0 (#2250)
* Update versions file for 1.0.0 release

* Prepare stable-v1 for version v1.0.0

* Update trace signal status in documentation

* Update changelog

* Update CHANGELOG.md

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

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2021-09-20 13:02:46 -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
62af6c7077
semconv-gen: fix capitalization at word boundaries, add stability/deprecation indicators (#2033)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-06-28 09:11:49 -07:00
Anthony Mirabella
ced177b795
Pre-release 1.0.0-RC1 (#2013)
* Add versions.yaml to specify module version sets
* Prepare for releasing v1.0.0-RC1
* Update experimental-metrics and bridge module sets to v0.21.0
* Prepare for releasing v0.21.0
* Fixup go.mod version references
* Update version.go
* Update CHANGELOG
* Update godoc references to "pre-GA phase" for RC1 packages
* Update website_docs for 1.0.0-RC1

Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
2021-06-18 11:22:16 -04:00
Anthony Mirabella
cdf67ddfa3
Update semantic conventions to v1.4.0, move to versioned package (#1987)
* Update semantic conventions to v1.4.0, move to versioned package

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

* precommit wants explicit import path renaming for semconv/v1.4.0

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

* Fix semconv import path in stdout exporter example

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

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-06-10 13:03:43 -04:00
Anderson Queiroz
7a0cee7b3a
Replaces golint by revive and fix newly reported linter issues (#1946)
* replaces golint by revive and fix newly reported linter issues

* add pull request ID to CHANGELOG.md

* Update internal/matchers/temporal_matcher.go

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

* fix pull request issues

* explains why the linter is disabled

* Update semconv/http.go

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

* Update metric/unit/unit.go

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

* restores 'example/passthrough/go.sum' to original state

* fix after rebase

* export ErrInvalidAsyncRunner again and add nolint

* Update trace/tracestate.go

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

* Update sdk/metric/sdk.go

Co-authored-by: Aaron Clawson <Aaron.Clawson@gmail.com>

* Fix ContextWithoutBaggage comment

* Fix SpanEndOption comment

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Aaron Clawson <Aaron.Clawson@gmail.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
2021-06-08 10:10:01 -07:00
Tigran Najaryan
46d9687a35
Add Schema URL support to Resource (#1938)
This implements specification requirement:
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/sdk.md#resource-creation

- Changes `resource.NewWithAttributes` to require a schema URL. The old function
  is still available as `resource.NewSchemaless`. This is a breaking change.
  We want to encourage using schema URL and make it a conscious choice to have a
  resource without schema.

- Merge schema URLs acccording to the spec in resource.Merge.

- Several builtin resource detectors now correctly populate the schema URL.

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-06-08 09:46:42 -07:00
Anthony Mirabella
035fc650a2
Do not include authentication information in the http.url attribute (#1919)
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
2021-05-13 13:05:44 -04: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
Tony Li
a1349944c0
Update resource.go (#1871)
* Update resource.go

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-05-03 09:50:36 -07:00
Nelson Ghezzi
aa66fe75e4
OS and Process resource detectors (#1788)
* WIP: OS and Process resource detectors

* Completed documentation headers

* Added empty test files for OS and Process resource functions

* Split long line

* Added resource.WithOS function test

* Added resource.WithProcess* functions tests

* Renamed osDetector and WithOS function to better reflect they only add the os.type attribute

* Updated changelog

* WIP: possible use of wrappers for getting attribute values

* Refined implementation of wrapper functions providing os/runtime/user information

* Added PR number to new changelog entries

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

* Fix wrong function name in documentation header

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

* Fixed wording in WithProcessOwner documentation header

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

* Updated osTypeDetector

* Replaced ToUpper with ToLower to match the current convention.
* Used runtimeOS provider to get the OS name.

* Adapted WithOSType test to mock runtime providers

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-04-23 08:28:13 -07:00
Alik Khilazhev
4d141e4752
Add k8s.node.name and k8s.node.uid to semconv (#1789)
* Add k8s.node.name and k8s.node.uid to semconv

According to the specification[1] they should exist.

[1] https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/k8s.md#node

* Update changelog

* Update semconv/resource.go

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

* Update semconv/resource.go

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

* Update CHANGELOG.md

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

* Update semconv/resource.go

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

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-04-12 08:21:13 -07:00
Jack Wink
33699d242d
Adds semantic conventions for exceptions (#1492)
Adds support for the opentelemetry exceptions semantic conventions. In
short, this has RecordError produce an exception event with exception
attributes instead of using the error event and error attributes.

While golang does not have exceptions, the spec itself does not
differentiate between errors and exceptions for recording purposes.
RecordError was kept as the method name, both for backwards
compatibility and to reduce confusion (the method signature takes in a
golang error object). The spec appears to allow this, as it suggests the
method is optional and signature may reflect whatever is most appropriate
for the language implementing it.

It may seem non-intuitive to log an exception event from a method called
RecordError, but it's beneficial to have consistent behavior across all
opentelemetry SDKs. Downstream projects like the opentelemetry-collector
can build off of the published API and not special case behaviors from
individual languages.
2021-04-01 13:07:46 -07:00
Matej Gera
58f69f091e
Span status from HTTP code: Do not set status message if it can be inferred (#1681)
* Do not set status message if reason can be inferred

* Update CHANGELOG

* Add comment on validation func

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-03-10 08:28:09 -08:00
Hussein Al Abry
b94cd4b249
add code attributes to semconv package (#1558)
* add code attributes to semconv package

* update changelog

* update comment for code semconv attributes

Adds a full-stop at the end of the comment.

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2021-02-22 13:42:52 -08:00
Punya Biswal
ecf65d7968
Rename otel/label -> otel/attribute (#1541)
* Rename otel/label -> otel/attr

Leave the imported name alone, to avoid a large diff and conflicts

* Better import comment

* Update CHANGELOG.md

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

* otel/attr -> otel/attribute

* Missed the changelog entry

* Get rid of import renaming

* Merge remaining conflicts

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
2021-02-18 12:59:37 -05:00
Sean Schade
73a05393a0
chore(semconv): Add PR number to changelog (#1323)
feat(semconv): Add DeploymentEnvironmentKey to semconv package
2020-11-16 10:29:28 -08:00
Ross Light
380d9455fd
s/HTTPUrlKey/HTTPURLKey/ in semconv (#1338)
* s/HTTPUrlKey/HTTPURLKey/ in semconv

* Fix build

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-11-16 09:55:25 -08:00
José Carlos Chávez
e22a48de5a
chore: adds vanity import for files that don't have it. (#1297) 2020-11-04 09:10:58 -08:00
Tyler Yahn
034195692a
Update README and documentation to better communicate pre-GA state (#1281)
* Update README

Move project status to top of project documentation and add explicit
warnings that this project may introduce breaking changes.

* Add disclaimer to public packages docs

* Use explicit warning in README
2020-10-29 09:23:13 -07:00
Tyler Yahn
4ea0a20885
Update semconv comments (#1249)
Add comments to fix lint issues with the semconv package and add
clarifying documentation for attributes.
2020-10-13 12:35:10 -07: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
huikang
dc79f7fe25
Remove duplicate hostname in Resource (#1219)
* Remove duplicate hostname in Resource

- Refer to opentelemetry-specification

Signed-off-by: Hui Kang <kangh@us.ibm.com>

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-10-01 08:28:27 -07:00
Cole Packingham
5dd2962202
Remove semantic convention for http status text (#1194)
* Remove http status text

* Updated changelog

* More descriptive changelog

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

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-09-23 14:52:44 -04:00
Sam Xie
6f048eb832
Add more semantic conventions for k8s as resource attributes (#1167)
* Add more semantic conventions for k8s

* Update CHANGELOG

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-09-11 14:46:24 -07:00
Tyler Yahn
f995380e58
Unify api/label and api/kv in new label package (#1060)
* Move `api/label` to `label`

* Move `api/kv` package contents into `label` package

* Unify label package name

* Move `api/internal/rawhelpers.go` to `internal`

* Propagate replacing `api/kv` with `label` pkg

* golint

* Fix over-aggressive change

* Update Changelog
2020-08-17 20:25: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
Anthony Mirabella
b40fdf174b
Move content length out of basic attributes (#1031)
* Move content length out of basic attributes

semconv.httpBasicAttributesFromHTTPRequest() was including the request's content length,
which is a high-cardinality label.  It ended up in metric labels through the use of that function
by semconv.HTTPServerMetricAttributesFromHTTPRequest().

* Add CHANGELOG entry

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2020-08-05 13:24:28 -07:00
Tyler Yahn
96a5f8ff46
Rename api/standard package to semconv (#1016)
* Rename api/standard package to semconv

* Update `api/standard` package dependencies to `semconv`

* Update Changelog

* Add PR number to Changelog
2020-08-04 07:51:09 -07:00