From cb36d755940dce3645c9537c31a53d759a419c7c Mon Sep 17 00:00:00 2001 From: Gerry Agbobada <10496163+gagbo@users.noreply.github.com> Date: Tue, 5 Sep 2023 10:14:05 +0200 Subject: [PATCH] chore: release 0.7 (#66) --- CHANGELOG.md | 24 ++++++++++++++++-------- go.work | 1 + 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26bf5cf..95ec10c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Go module versioning](https://go.dev/doc/modules/version-numbers). -## [Unreleased](https://github.com/autometrics-dev/autometrics-go/compare/v0.6.1...main) +## [Unreleased](https://github.com/autometrics-dev/autometrics-go/compare/v0.7.0...main) ### Added @@ -20,27 +20,35 @@ versioning](https://go.dev/doc/modules/version-numbers). ### Security -## [0.6.1](https://github.com/autometrics-dev/autometrics-go/releases/tag/v0.6.1) 2023-07-24 +## [0.7.0](https://github.com/autometrics-dev/autometrics-go/releases/tag/v0.7.0) 2023-09-04 ### Added -- The Go generator now removes all the old defer statements in function bodies before re-adding - only the necessary ones. This means calling `go generate` on a file that has no annotation - at all effectively cleans up the whole file from autometrics. - All metrics now have a `service_name` label, which can either be compiled in `Init` call, or filled at runtime from environment variables (in order of precedence): + `AUTOMETRICS_SERVICE_NAME` + `OTEL_SERVICE_NAME` - + ### Changed -- Instead of returning an error when the go generator does not find the autometrics import - in a file, it will add the needed import itself in the file. - Function calls metric has been renamed from `function_calls_count_total` to `function_calls_total` - Function calls duration histogram has been renamed from `function_calls_duration` to `function_calls_duration_seconds` - Function caller label has been split from `caller` to `caller_function` and `caller_label` +## [0.6.1](https://github.com/autometrics-dev/autometrics-go/releases/tag/v0.6.1) 2023-07-24 + +### Added + +- The Go generator now removes all the old defer statements in function bodies before re-adding + only the necessary ones. This means calling `go generate` on a file that has no annotation + at all effectively cleans up the whole file from autometrics. + +### Changed + +- Instead of returning an error when the go generator does not find the autometrics import + in a file, it will add the needed import itself in the file. + ### Fixed - Code generation now works when `autometrics` is imported with the `_` alias diff --git a/go.work b/go.work index a405bee..023e107 100644 --- a/go.work +++ b/go.work @@ -3,4 +3,5 @@ go 1.20 use ( . ./examples/web + ./examples/otel )