Skip to content

Releases: marcdel/open_telemetry_decorator

v1.5.9

11 Dec 02:55
Compare
Choose a tag to compare
  • Update dependencies: dialyxir, ex_doc, o11y

Full Changelog: v1.5.8...v1.5.9

v1.5.8

12 Nov 18:23
Compare
Choose a tag to compare
  • Update o11y and credo dependencies

Full Changelog: v1.5.7...v1.5.8

v1.5.7

24 Oct 06:38
Compare
Choose a tag to compare
  • Update dependencies
  • Add pid as a default span attribute

Full Changelog: v1.5.6...v1.5.7

v1.5.6

12 Jul 17:24
Compare
Choose a tag to compare
  • 🐞BUG FIX: v1.5.4 introduced a bug where exits were being caught and the span annotated, but then control flow continued as if the exit had not occurred. We now exit with the same reason that was caught, so control flow is unchanged.

Full Changelog: v1.5.5...v1.5.6

v1.5.5

12 Jul 16:47
Compare
Choose a tag to compare

What's Changed

  • Catch throws, stringify thrown values and exit reasons for reporting by @erszcz in #149

Full Changelog: v1.5.4...v1.5.5

v1.5.4

04 Jul 02:28
Compare
Choose a tag to compare

Catch unhandled Erlang exits and add an error status to the span.

What's Changed

  • Set error on a span with an unhandled :erlang.exit() by @erszcz in #148

New Contributors

Full Changelog: v1.5.3...v1.5.4

v1.5.3

23 May 06:08
Compare
Choose a tag to compare
  • Bumps o11y version to v0.2.4 which includes an add_event method that processes the attributes given to it the same way with_span does.

Full Changelog: v1.5.2...v1.5.3

v1.5.2

05 May 17:12
Compare
Choose a tag to compare

v1.5.2

  • Fixes a bug which included input parameters you didn't ask for in the span attributes.

Full Changelog: v1.5.1...v1.5.2

v1.5.1

27 Apr 06:43
Compare
Choose a tag to compare
  • Fixes a bug with missing attrs_version

Full Changelog: v1.5.0...v1.5.1

v1.5.0

27 Apr 05:12
Compare
Choose a tag to compare
  • 🚨 The decorator now uses the O11y.set_attribute(s) functions to set attributes on spans. This means that the attribute processing logic that was here previously has been migrated there. However, there are some backwards incompatible changes listed below.
  • 🚨 The decorator no longer supports nested attributes in the include option. The O11y set_attribute and set_attributes functions should now be used to handle more complex attribute specifications. The SpanAttributes protocol in particular is what I recommend if you need to extract a subset of fields from an object. The example below will add only user.id and user.name to the span attributes.
defmodule User do
  @derive {O11y.SpanAttributes, only: [:id, :name]}
  defstruct [:id, :name, :email, :password]
end

defmodule UserFactory do
  use OpenTelemetryDecorator

  @decorate with_span("UserFactory.create", include: [:user])
  def create() do
    user = %User{id: 1, name: "Bob", email: "[email protected]", password: "secret"}
    {:ok, user}
  end
end
  • 🚨 Changes the default attrs_version to "v2". You can override this with config :open_telemetry_decorator, attrs_version: "v1", but that only affects usages of Attribtues directly.
  • ⚠️ Changes AttributesV2 to use the O11y.set_attribute(s) functions. The attribute processing logic that was here previously has been migrated there. However, there are some backwards incompatible changes listed below.
  • ⚠️ Changed functionality: the error attribute is no longer treated differently from other attributes. It will be namespaced or prefixed as expected. If you're using Honeycomb this field will be automatically derived from the span's status_code, so you don't need to (and probably shouldn't) set it manually. Instead, use O11y.set_error/1 to set the status code to "error" and message to the provided (string or exception) value.
  • ⚠️ Changed functionality: maps and structs given to Attributes.set/2 will be flattened and prefixed with the given name. e.g.
params = %{key: "value"}
Attributes.set(:params, params)
# Becomes
%{"params.key" => "value"}

Full Changelog: v1.4.13...v1.5.0