-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support distributed trace sampling #52
base: master
Are you sure you want to change the base?
Changes from all commits
f5eb665
322aa33
fbbebcd
b7cb9e8
63bec74
7294fa0
6c98e16
13f92f4
b21745c
ea15a73
97ebb97
a68debd
cbd8977
8f2075a
b99404d
a73218a
508ab18
6fd352b
2dcbc69
680acc8
31d0a9e
27f9d9e
132961c
26f3c03
2f7c7c3
f1e64a2
e0618f2
dac254a
5b3a758
bd2f7ac
2aa894b
a4c87d1
418834d
257451c
78c01a3
968aa6b
ba93460
4ace750
2c22a7f
7d903be
dd69b30
4d018cb
6fd650d
71cda32
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,61 @@ | ||||||
--- | ||||||
name: CI | ||||||
on: push | ||||||
|
||||||
jobs: | ||||||
elixir: | ||||||
name: Elixir Tests | ||||||
runs-on: ubuntu-20.04 | ||||||
env: | ||||||
MIX_ENV: test | ||||||
strategy: | ||||||
matrix: | ||||||
elixir: ['1.11.4', '1.13.4'] | ||||||
otp: ['24.3'] | ||||||
steps: | ||||||
- name: Cancel previous runs | ||||||
uses: styfle/cancel-workflow-action@0.5.0 | ||||||
with: | ||||||
access_token: ${{ github.token }} | ||||||
|
||||||
- name: Checkout code | ||||||
uses: actions/checkout@v2 | ||||||
|
||||||
- name: Setup Elixir | ||||||
uses: erlef/setup-beam@v1 | ||||||
with: | ||||||
otp-version: ${{ matrix.otp }} | ||||||
elixir-version: ${{ matrix.elixir }} | ||||||
|
||||||
- name: Get deps cache | ||||||
uses: actions/cache@v2 | ||||||
with: | ||||||
path: deps/ | ||||||
key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good |
||||||
|
||||||
- name: Get build cache | ||||||
uses: actions/cache@v2 | ||||||
with: | ||||||
path: _build/test/ | ||||||
key: build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }} | ||||||
|
||||||
- name: Install deps | ||||||
run: | | ||||||
mix local.rebar --force | ||||||
mix local.hex --force | ||||||
Comment on lines
+44
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rebar3 and Hex are installed by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good |
||||||
mix deps.get | ||||||
|
||||||
- name: Compile code | ||||||
run: | | ||||||
mix compile --warnings-as-errors | ||||||
|
||||||
- name: Run tests | ||||||
run: | | ||||||
mix test | ||||||
mix format --check-formatted | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
|
||||||
# - name: Publish unit test results to GitHub | ||||||
# uses: EnricoMi/publish-unit-test-result-action@v2 | ||||||
# if: always() # always run even if tests fail | ||||||
# with: | ||||||
# junit_files: _build/test/lib/*/test-junit-report.xml |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,20 @@ See [Conventional Commits](Https://conventionalcommits.org) for commit guideline | |
|
||
<!-- changelog --> | ||
|
||
### Breaking Changes: | ||
* Change default `priority` to `nil` (not set) instead of 1 | ||
* Do not send metric for `priority` unless set | ||
* Do not set `x-datadog-sampling-priority` header unless priority is set | ||
* Use `sample_rate` tag to set `_dd1.sr.eausr` value | ||
* Use `rule_sample_rate` tag to set `_dd.rule_psr` without default (previously hard coded to 1.0) | ||
* Use `rate_limiter_rate` tag to set `_dd.limit_psr`, without default (previously hard coded to 1.0) | ||
Comment on lines
+9
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm curious if you know whether these breaking changes are necessary or if you're just proposing them. If we could avoid making breaking changes in Spandex, that would obviously be preferred, but if the current behavior is incorrect in terms of what Datadog expects, then we can definitely move toward fixing it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They are necessary for us to have control so we can reduce our Datadog bill :-). |
||
* Update library deps | ||
|
||
### Features: | ||
* Handle `x-datadog-origin` header | ||
* Use `agent_sample_rate` tag to set `_dd.agent_psr`, without default (was 1.0) | ||
* Add sampler which samples a proportion of traces, setting `priority` | ||
|
||
## [1.2.0](https://github.com/spandex-project/spandex_datadog/compare/1.1.0...1.2.0) (2021-10-23) | ||
|
||
### Features: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
# This file is responsible for configuring your application | ||
# and its dependencies with the aid of the Mix.Config module. | ||
use Mix.Config | ||
# and its dependencies with the aid of the Config module. | ||
# | ||
# This configuration file is loaded before any dependency and | ||
# is restricted to this project. | ||
|
||
import_config "./#{Mix.env()}.exs" | ||
# General application configuration | ||
import Config | ||
|
||
# Import environment specific config. This must remain at the bottom | ||
# of this file so it overrides the configuration defined above. | ||
import_config "#{config_env()}.exs" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use Mix.Config | ||
import Config | ||
|
||
config :git_ops, | ||
mix_project: SpandexDatadog.MixProject, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be removed now that there's a GitHub Actions workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't use CircleCI, so it's fine with me.