Skip to content

Commit

Permalink
HTTP instrumentation header extraction functions (open-telemetry#356)
Browse files Browse the repository at this point in the history
* HTTP instrumentation header extraction functions

* allow setting beam opts to publishing

* export types

* Add test for x-forwarded-for w/multi entries
  • Loading branch information
bryannaegele authored Aug 13, 2024
1 parent 1f95229 commit 0db4db5
Show file tree
Hide file tree
Showing 8 changed files with 702 additions and 91 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/publish-mix-hex-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ on:
- "tesla"
- "xandra"
required: true
otp-version:
description: "OTP version"
type: string
default: "25.3.2.5"
elixir-version:
description: "Elixir version"
type: string
default: "1.14.5"
rebar3-version:
description: "Rebar3 version"
type: string
default: "3.22.1"
action:
description: "Publish release"
required: true
Expand Down Expand Up @@ -195,9 +207,9 @@ jobs:
- uses: erlef/setup-beam@b9c58b0450cd832ccdb3c17cc156a47065d2114f # v1.18.1
with:
version-type: strict
otp-version: "25.3.2.5"
elixir-version: "1.14.5"
rebar3-version: "3.22.1"
otp-version: ${{ inputs.otp-version }}
elixir-version: ${{ inputs.elixir-version }}
rebar3-version: ${{ inputs.rebar3-version }}

- name: "Mix Hex Publish Dry-run"
if: ${{ needs.config.outputs.build_tool == 'mix' }}
Expand Down
14 changes: 14 additions & 0 deletions utilities/opentelemetry_instrumentation_http/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## v0.2.0

## Features

* Adds several header extraction and manipulation functions for common tasks
in instrumentation libraries:
* `extract_client_info/1`
* `extract_client_info/2`
* `extract_scheme/1`
* `extract_scheme/2`
* `extract_server_info/1`
* `extract_server_info/2`
* Generate OTP27 docs

## v0.1.0

### Changed
Expand Down
4 changes: 2 additions & 2 deletions utilities/opentelemetry_instrumentation_http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

```erlang
{deps, [
{opentelemetry_instrumentation_http, "~> 0.1"}
{opentelemetry_instrumentation_http, "~> 0.2"}
]}
```
```elixir
def deps do
[
{:opentelemetry_instrumentation_http, "~> 0.1"}
{:opentelemetry_instrumentation_http, "~> 0.2"}
]
end
```
Expand Down
4 changes: 0 additions & 4 deletions utilities/opentelemetry_instrumentation_http/docs.config

This file was deleted.

15 changes: 0 additions & 15 deletions utilities/opentelemetry_instrumentation_http/docs.sh

This file was deleted.

22 changes: 12 additions & 10 deletions utilities/opentelemetry_instrumentation_http/rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@
rebar3_hex
]}.
{profiles, [
{docs, [
{deps, [edown]},
{edoc_opts, [
{preprocess, true},
{doclet, edoc_doclet_chunks},
{layout, edoc_layout_chunks},
{dir, "_build/default/lib/opentelemetry_instrumentation_http/doc"},
{subpackages, true}
]}
]},
{test, [
{erl_opts, [nowarn_export_all]},
{deps, []},
Expand All @@ -35,3 +25,15 @@
{cover_enabled, true}.
{cover_export_enabled, true}.
{covertool, [{coverdata_files, ["ct.coverdata"]}]}.

{plugins, [rebar3_ex_doc]}.

{hex, [
{doc, #{provider => ex_doc}}
]}.

{ex_doc, [
{source_url, <<"https://github.com/opentelemetry-erlang-contrib/utilities/opentelemetry_instrumentation_http">>},
{extras, [<<"README.md">>, <<"CHANGELOG.md">>, <<"LICENSE">>]},
{main, <<"readme">>}
]}.
Loading

0 comments on commit 0db4db5

Please sign in to comment.