libdatadog 33.0.0.1.0 → 35.0.0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/libdatadog/version.rb +1 -1
- data/libdatadog.gemspec +43 -0
- data/rust-toolchain.toml +6 -0
- data/tasks/build.rake +2 -0
- data/tasks/gem.rake +249 -0
- data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux}/LICENSE-3rdparty.csv +2 -0
- data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/bin/libdatadog-crashtracking-receiver +0 -0
- data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux}/include/datadog/common.h +28 -3
- data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux}/include/datadog/data-pipeline.h +137 -4
- data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux-musl}/LICENSE-3rdparty.csv +2 -0
- data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/bin/libdatadog-crashtracking-receiver +0 -0
- data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/common.h +28 -3
- data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/data-pipeline.h +137 -4
- data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/LICENSE-3rdparty.csv +2 -0
- data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/bin/libdatadog-crashtracking-receiver +0 -0
- data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/arm64-darwin}/include/datadog/common.h +28 -3
- data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/data-pipeline.h +137 -4
- data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/lib/libdatadog_profiling.dylib +0 -0
- data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- data/vendor/libdatadog-35.0.0/x86_64-linux/LICENSE-3rdparty.csv +550 -0
- data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/bin/libdatadog-crashtracking-receiver +0 -0
- data/vendor/libdatadog-35.0.0/x86_64-linux/include/datadog/common.h +2900 -0
- data/vendor/libdatadog-35.0.0/x86_64-linux/include/datadog/data-pipeline.h +349 -0
- data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/lib/libdatadog_profiling.so +0 -0
- data/vendor/libdatadog-35.0.0/x86_64-linux/lib/pkgconfig/datadog_profiling_with_rpath.pc +15 -0
- data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/LICENSE-3rdparty.csv +2 -0
- data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/bin/libdatadog-crashtracking-receiver +0 -0
- data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/common.h +28 -3
- data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/data-pipeline.h +137 -4
- data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/lib/libdatadog_profiling.so +0 -0
- data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/lib/pkgconfig/datadog_profiling_with_rpath.pc +1 -1
- metadata +85 -82
- data/vendor/libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/LICENSE-3rdparty.csv +0 -548
- data/vendor/libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/common.h +0 -2875
- data/vendor/libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/include/datadog/data-pipeline.h +0 -216
- data/vendor/libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu/lib/pkgconfig/datadog_profiling_with_rpath.pc +0 -15
- /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/LICENSE +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/NOTICE +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/crashtracker.h +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/ffe.h +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/library-config.h +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/log.h +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/profiling.h +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux/libdatadog-aarch64-unknown-linux-gnu → libdatadog-35.0.0/aarch64-linux}/include/datadog/telemetry.h +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/LICENSE +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/NOTICE +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/crashtracker.h +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/ffe.h +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/library-config.h +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/log.h +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/profiling.h +0 -0
- /data/vendor/{libdatadog-33.0.0/aarch64-linux-musl/libdatadog-aarch64-alpine-linux-musl → libdatadog-35.0.0/aarch64-linux-musl}/include/datadog/telemetry.h +0 -0
- /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/LICENSE +0 -0
- /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/NOTICE +0 -0
- /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/crashtracker.h +0 -0
- /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/ffe.h +0 -0
- /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/library-config.h +0 -0
- /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/log.h +0 -0
- /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/profiling.h +0 -0
- /data/vendor/{libdatadog-33.0.0/arm64-darwin/libdatadog-aarch64-apple-darwin → libdatadog-35.0.0/arm64-darwin}/include/datadog/telemetry.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/LICENSE +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/NOTICE +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/crashtracker.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/ffe.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/library-config.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/log.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/profiling.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux/libdatadog-x86_64-unknown-linux-gnu → libdatadog-35.0.0/x86_64-linux}/include/datadog/telemetry.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/LICENSE +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/NOTICE +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/blazesym.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/crashtracker.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/ddsketch.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/ffe.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/library-config.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/log.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/profiling.h +0 -0
- /data/vendor/{libdatadog-33.0.0/x86_64-linux-musl/libdatadog-x86_64-alpine-linux-musl → libdatadog-35.0.0/x86_64-linux-musl}/include/datadog/telemetry.h +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ab0a20f1852ac415e905e178e09208b0986f3119d936a3f8f8326df8e0f778a1
|
|
4
|
+
data.tar.gz: aadd3917949f04607ba2be0ea20dff98349b5a14844b87b6dcd7508b40ec1fcf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 538303506ea439d8a62e885f65ca62df32d62d4482bd61984c261d47652d814517a7e379038876c57e4bf0e78c5da40981b666f37f83eec2bb9cb40303b029f0
|
|
7
|
+
data.tar.gz: 7859de5265189b8b2e5faaf8c7ec6c91a6fbd2d0bc482dec4de443f5362a8458f2ae15390c7d6947d78785b12dd6c0a09d3c70c3aca9e865d8e464534dc4f92c
|
data/lib/libdatadog/version.rb
CHANGED
data/libdatadog.gemspec
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
lib = File.expand_path("../lib", __FILE__)
|
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
|
+
require "libdatadog/version"
|
|
6
|
+
|
|
7
|
+
Gem::Specification.new do |spec|
|
|
8
|
+
spec.name = "libdatadog"
|
|
9
|
+
spec.version = Libdatadog::VERSION
|
|
10
|
+
spec.authors = ["Datadog, Inc."]
|
|
11
|
+
spec.email = ["dev@datadoghq.com"]
|
|
12
|
+
|
|
13
|
+
spec.summary = "Library of common code used by Datadog Continuous Profiler for Ruby"
|
|
14
|
+
spec.description =
|
|
15
|
+
"libdatadog is a Rust-based utility library for Datadog's ddtrace gem."
|
|
16
|
+
spec.homepage = "https://docs.datadoghq.com/tracing/"
|
|
17
|
+
spec.license = "Apache-2.0"
|
|
18
|
+
spec.required_ruby_version = ">= 2.5.0"
|
|
19
|
+
|
|
20
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
|
21
|
+
|
|
22
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
23
|
+
spec.metadata["source_code_uri"] = "https://github.com/datadog/libdatadog-rb"
|
|
24
|
+
|
|
25
|
+
# Require releases on rubygems.org to be coming from multi-factor-auth-authenticated accounts
|
|
26
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
|
27
|
+
|
|
28
|
+
# Specify which files should be added to the gem when it is released.
|
|
29
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
30
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
31
|
+
`git ls-files -z`
|
|
32
|
+
.split("\x0")
|
|
33
|
+
.reject do |f|
|
|
34
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features|publish)/|\.(?:git|travis|circleci)|appveyor)})
|
|
35
|
+
end
|
|
36
|
+
.reject do |f|
|
|
37
|
+
[".rspec", ".standard.yml", "Rakefile", "docker-compose.yml", "Gemfile", "README.md", "CONTRIBUTING.md", "LICENSE-3rdparty.yml"].include?(f)
|
|
38
|
+
end
|
|
39
|
+
.reject { |f| f.end_with?(".tar.gz") }
|
|
40
|
+
.reject { |f| f.end_with?(".nix") || f.start_with?("flake.") }
|
|
41
|
+
end
|
|
42
|
+
spec.require_paths = ["lib"]
|
|
43
|
+
end
|
data/rust-toolchain.toml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
[toolchain]
|
|
2
|
+
# Rust toolchain used to build libdatadog from source. Keep the channel in sync
|
|
3
|
+
# with the libdatadog `rust-toolchain.toml` for the LIB_VERSION being packaged
|
|
4
|
+
# and with the CI `RUST_VERSION` in .github/workflows/build.yml.
|
|
5
|
+
channel = "1.87.0"
|
|
6
|
+
profile = "minimal"
|
data/tasks/build.rake
CHANGED
|
@@ -10,8 +10,10 @@ module BuildFromSource
|
|
|
10
10
|
RUST_TO_RUBY = {
|
|
11
11
|
"x86_64-unknown-linux-gnu" => "x86_64-linux",
|
|
12
12
|
"x86_64-unknown-linux-musl" => "x86_64-linux-musl",
|
|
13
|
+
"x86_64-alpine-linux-musl" => "x86_64-linux-musl",
|
|
13
14
|
"aarch64-unknown-linux-gnu" => "aarch64-linux",
|
|
14
15
|
"aarch64-unknown-linux-musl" => "aarch64-linux-musl",
|
|
16
|
+
"aarch64-alpine-linux-musl" => "aarch64-linux-musl",
|
|
15
17
|
"aarch64-apple-darwin" => "arm64-darwin"
|
|
16
18
|
}.freeze
|
|
17
19
|
|
data/tasks/gem.rake
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "pathname"
|
|
4
|
+
require "rubygems/package"
|
|
5
|
+
require "rubygems/package/tar_reader"
|
|
6
|
+
require "zlib"
|
|
7
|
+
require "stringio"
|
|
8
|
+
|
|
9
|
+
# Builds .gem packages from vendored libdatadog artifacts.
|
|
10
|
+
#
|
|
11
|
+
# Intentionally duplicates some Rakefile logic so both can coexist during
|
|
12
|
+
# the migration; the Rakefile originals will be removed once the new tasks
|
|
13
|
+
# are fully adopted.
|
|
14
|
+
module GemPackaging
|
|
15
|
+
module Platform
|
|
16
|
+
# Mapping from gem platform names to the vendor platform directories
|
|
17
|
+
# included in that gem. We bundle glibc and musl variants together
|
|
18
|
+
# for Linux to work around https://github.com/rubygems/rubygems/issues/3174
|
|
19
|
+
GEM_TO_VENDOR = {
|
|
20
|
+
"x86_64-linux" => ["x86_64-linux", "x86_64-linux-musl"],
|
|
21
|
+
"aarch64-linux" => ["aarch64-linux", "aarch64-linux-musl"],
|
|
22
|
+
"arm64-darwin" => ["arm64-darwin"]
|
|
23
|
+
}.freeze
|
|
24
|
+
|
|
25
|
+
ALL_VENDOR = GEM_TO_VENDOR.values.flatten.freeze
|
|
26
|
+
|
|
27
|
+
class << self
|
|
28
|
+
# Resolve a RUBY_PLATFORM string (or gem platform name) to a known
|
|
29
|
+
# gem platform key.
|
|
30
|
+
#
|
|
31
|
+
# resolve("x86_64-linux") #=> "x86_64-linux"
|
|
32
|
+
# resolve("x86_64-linux-musl") #=> "x86_64-linux"
|
|
33
|
+
# resolve("arm64-darwin24") #=> "arm64-darwin"
|
|
34
|
+
def resolve(platform_string)
|
|
35
|
+
return platform_string if GEM_TO_VENDOR.key?(platform_string)
|
|
36
|
+
|
|
37
|
+
# musl suffix (x86_64-linux-musl -> x86_64-linux)
|
|
38
|
+
without_musl = platform_string.sub(/-musl\z/, "")
|
|
39
|
+
return without_musl if GEM_TO_VENDOR.key?(without_musl)
|
|
40
|
+
|
|
41
|
+
# macOS Darwin version suffix (arm64-darwin24 -> arm64-darwin)
|
|
42
|
+
GEM_TO_VENDOR.each_key do |gp|
|
|
43
|
+
return gp if platform_string.start_with?(gp)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
raise "Could not resolve platform '#{platform_string}' to a supported gem platform. " \
|
|
47
|
+
"Supported: #{GEM_TO_VENDOR.keys.join(", ")}, ruby"
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Vendor platform directories needed for a given gem platform.
|
|
51
|
+
def vendor_platforms(gem_platform)
|
|
52
|
+
if gem_platform == "ruby"
|
|
53
|
+
ALL_VENDOR
|
|
54
|
+
else
|
|
55
|
+
GEM_TO_VENDOR.fetch(gem_platform) do
|
|
56
|
+
raise "Unknown gem platform: #{gem_platform}. " \
|
|
57
|
+
"Supported: #{GEM_TO_VENDOR.keys.join(", ")}, ruby"
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
module Paths
|
|
65
|
+
class << self
|
|
66
|
+
# Project root
|
|
67
|
+
def root
|
|
68
|
+
@root ||= (Pathname.new(__dir__) / "..").expand_path
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Vendor tree for the current library version
|
|
72
|
+
def vendor
|
|
73
|
+
root / "vendor" / "libdatadog-#{Libdatadog::LIB_VERSION}"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Vendor directory for a specific platform
|
|
77
|
+
def vendor_platform(name)
|
|
78
|
+
vendor / name
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Output directory for built gems
|
|
82
|
+
def pkg
|
|
83
|
+
root / "pkg"
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# The gemspec file
|
|
87
|
+
def gemspec
|
|
88
|
+
root / "libdatadog.gemspec"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Expected .gem filename for a given gem platform
|
|
92
|
+
def gem_file_name(gem_platform)
|
|
93
|
+
spec = Gem::Specification.new do |s|
|
|
94
|
+
s.name = "libdatadog"
|
|
95
|
+
s.version = Libdatadog::VERSION
|
|
96
|
+
s.platform = gem_platform unless gem_platform == "ruby"
|
|
97
|
+
end
|
|
98
|
+
spec.file_name
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Full path to the .gem for a given gem platform
|
|
102
|
+
def gem(gem_platform)
|
|
103
|
+
pkg / gem_file_name(gem_platform)
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
module Packager
|
|
109
|
+
# Files that must have executable permissions (0755); everything else gets 0644.
|
|
110
|
+
EXECUTABLE_FILES = %w[
|
|
111
|
+
libdatadog-crashtracking-receiver
|
|
112
|
+
libdatadog_profiling.so
|
|
113
|
+
libdatadog_profiling.dylib
|
|
114
|
+
].freeze
|
|
115
|
+
|
|
116
|
+
# Vendored files excluded from gems (not needed at runtime).
|
|
117
|
+
EXCLUDED_FILES = %w[
|
|
118
|
+
datadog_profiling.pc
|
|
119
|
+
libdatadog_profiling.a
|
|
120
|
+
datadog_profiling-static.pc
|
|
121
|
+
libdatadog_profiling.debug
|
|
122
|
+
DatadogConfig.cmake
|
|
123
|
+
].freeze
|
|
124
|
+
|
|
125
|
+
class << self
|
|
126
|
+
# Collect vendored files for one or more vendor platform directories,
|
|
127
|
+
# filtering out tarballs and files not needed at runtime.
|
|
128
|
+
# Returns paths relative to the project root (what gemspec.files expects).
|
|
129
|
+
def vendor_files(*vendor_platforms)
|
|
130
|
+
vendor_platforms.flat_map { |vp|
|
|
131
|
+
Paths.vendor_platform(vp).glob("**/*")
|
|
132
|
+
.select(&:file?)
|
|
133
|
+
.map { |p| p.relative_path_from(Paths.root).to_s }
|
|
134
|
+
.reject { |p| p.end_with?(".tar.gz") }
|
|
135
|
+
.reject { |p| EXCLUDED_FILES.include?(File.basename(p)) }
|
|
136
|
+
}
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Verify that required vendor directories exist and contain files.
|
|
140
|
+
def check_vendor!(*vendor_platforms)
|
|
141
|
+
missing = vendor_platforms.reject { |vp|
|
|
142
|
+
dir = Paths.vendor_platform(vp)
|
|
143
|
+
dir.exist? && dir.glob("**/*").any?(&:file?)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return if missing.empty?
|
|
147
|
+
|
|
148
|
+
raise "Missing vendor artifacts for: #{missing.join(", ")}. " \
|
|
149
|
+
"Expected under #{Paths.vendor}/. " \
|
|
150
|
+
"Run `rake libdatadog:build` or download vendor artifacts first."
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Build a single .gem into pkg/.
|
|
154
|
+
def build_gem(gem_platform:, vendor_platforms:)
|
|
155
|
+
check_vendor!(*vendor_platforms)
|
|
156
|
+
|
|
157
|
+
spec = eval(Paths.gemspec.read, nil, Paths.gemspec.to_s) # standard:disable Security/Eval
|
|
158
|
+
spec.files += vendor_files(*vendor_platforms)
|
|
159
|
+
spec.platform = gem_platform unless gem_platform == "ruby"
|
|
160
|
+
|
|
161
|
+
Paths.pkg.mkpath
|
|
162
|
+
|
|
163
|
+
puts "Building gem for platform=#{gem_platform} including: (this can take a while)"
|
|
164
|
+
pp spec.files.select { |f| f.start_with?("vendor/") }
|
|
165
|
+
|
|
166
|
+
Gem::Package.build(spec)
|
|
167
|
+
# build creates the .gem in cwd; move it into pkg/
|
|
168
|
+
gem_path = Paths.gem(gem_platform)
|
|
169
|
+
Pathname.new(spec.file_name).rename(gem_path)
|
|
170
|
+
puts("-" * 80)
|
|
171
|
+
|
|
172
|
+
gem_path
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Inspect the built .gem and raise on unexpected file permissions.
|
|
176
|
+
def validate_permissions!(gem_path)
|
|
177
|
+
puts "Validating permissions in #{gem_path}..."
|
|
178
|
+
|
|
179
|
+
Gem::Package::TarReader.new(gem_path.open("rb")) do |tar|
|
|
180
|
+
data_entry = tar.find { |entry| entry.header.name == "data.tar.gz" }
|
|
181
|
+
next unless data_entry
|
|
182
|
+
|
|
183
|
+
Gem::Package::TarReader.new(Zlib::GzipReader.new(StringIO.new(data_entry.read))) do |data_tar|
|
|
184
|
+
data_tar.each do |entry|
|
|
185
|
+
next if entry.directory?
|
|
186
|
+
|
|
187
|
+
filename = File.basename(entry.header.name)
|
|
188
|
+
actual = entry.header.mode.to_s(8)[-3..-1]
|
|
189
|
+
expected = EXECUTABLE_FILES.include?(filename) ? "755" : "644"
|
|
190
|
+
|
|
191
|
+
next if actual == expected
|
|
192
|
+
|
|
193
|
+
raise "Bad permissions for #{filename} in #{gem_path}: " \
|
|
194
|
+
"got #{actual}, expected #{expected}"
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
puts "Permissions OK."
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Package a single gem platform (a GEM_TO_VENDOR key, or "ruby").
|
|
203
|
+
def package(platform)
|
|
204
|
+
if Platform::GEM_TO_VENDOR.key?(platform) || platform == "ruby"
|
|
205
|
+
build_gem(
|
|
206
|
+
gem_platform: platform,
|
|
207
|
+
vendor_platforms: Platform.vendor_platforms(platform)
|
|
208
|
+
)
|
|
209
|
+
else
|
|
210
|
+
resolved = Platform.resolve(platform)
|
|
211
|
+
puts "Resolved '#{platform}' -> gem platform '#{resolved}'"
|
|
212
|
+
package(resolved)
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Package every supported binary gem platform plus the ruby fallback gem.
|
|
217
|
+
def package_all
|
|
218
|
+
Platform::GEM_TO_VENDOR.each_key { |gp| package(gp) }
|
|
219
|
+
package("ruby")
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
namespace :gem do
|
|
226
|
+
desc "Package gem(s). No argument: all platforms + ruby. " \
|
|
227
|
+
"With argument: a specific gem platform, 'ruby', or a RUBY_PLATFORM value.\n" \
|
|
228
|
+
" Examples: rake gem:package # all\n" \
|
|
229
|
+
" rake gem:package[x86_64-linux] # one binary platform\n" \
|
|
230
|
+
" rake gem:package[ruby] # ruby platform gem\n" \
|
|
231
|
+
" rake gem:package[arm64-darwin24] # resolved to arm64-darwin"
|
|
232
|
+
task :package, [:platform] do |_t, args|
|
|
233
|
+
platform = args[:platform]
|
|
234
|
+
|
|
235
|
+
if platform.nil? || platform.strip.empty?
|
|
236
|
+
GemPackaging::Packager.package_all
|
|
237
|
+
else
|
|
238
|
+
GemPackaging::Packager.package(platform)
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
desc "Validate file permissions in all gems under pkg/"
|
|
243
|
+
task :validate do
|
|
244
|
+
gems = GemPackaging::Paths.pkg.glob("*.gem")
|
|
245
|
+
raise "No .gem files found in #{GemPackaging::Paths.pkg}" if gems.empty?
|
|
246
|
+
|
|
247
|
+
gems.each { |gem_path| GemPackaging::Packager.validate_permissions!(gem_path) }
|
|
248
|
+
end
|
|
249
|
+
end
|
|
@@ -229,6 +229,7 @@ linux-raw-sys,https://github.com/sunfishcode/linux-raw-sys,Apache-2.0 WITH LLVM-
|
|
|
229
229
|
litemap,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers
|
|
230
230
|
lock_api,https://github.com/Amanieu/parking_lot,MIT OR Apache-2.0,Amanieu d'Antras <amanieu@gmail.com>
|
|
231
231
|
log,https://github.com/rust-lang/log,MIT OR Apache-2.0,The Rust Project Developers
|
|
232
|
+
lru,https://github.com/jeromefroe/lru-rs,MIT,Jerome Froelich <jeromefroelic@hotmail.com>
|
|
232
233
|
manual_future,https://github.com/dmarcuse/manual_future,MIT,Dominic Marcuse <dominic@marcuse.us>
|
|
233
234
|
matchers,https://github.com/hawkw/matchers,MIT,Eliza Weisman <eliza@buoyant.io>
|
|
234
235
|
matchit,https://github.com/ibraheemdev/matchit,MIT AND BSD-3-Clause,Ibraheem Ahmed <ibraheem@ibraheem.ca>
|
|
@@ -304,6 +305,7 @@ proc-macro-crate,https://github.com/bkchr/proc-macro-crate,MIT OR Apache-2.0,Bas
|
|
|
304
305
|
proc-macro-error,https://gitlab.com/CreepySkeleton/proc-macro-error,MIT OR Apache-2.0,CreepySkeleton <creepy-skeleton@yandex.ru>
|
|
305
306
|
proc-macro-error-attr,https://gitlab.com/CreepySkeleton/proc-macro-error,MIT OR Apache-2.0,CreepySkeleton <creepy-skeleton@yandex.ru>
|
|
306
307
|
proc-macro2,https://github.com/dtolnay/proc-macro2,MIT OR Apache-2.0,"David Tolnay <dtolnay@gmail.com>, Alex Crichton <alex@alexcrichton.com>"
|
|
308
|
+
proc-macro2-diagnostics,https://github.com/SergioBenitez/proc-macro2-diagnostics,MIT OR Apache-2.0,Sergio Benitez <sb@sergio.bz>
|
|
307
309
|
prost,https://github.com/tokio-rs/prost,Apache-2.0,"Dan Burkert <dan@danburkert.com>, Lucio Franco <luciofranco14@gmail.com>, Casper Meijn <casper@meijn.net>, Tokio Contributors <team@tokio.rs>"
|
|
308
310
|
prost-derive,https://github.com/tokio-rs/prost,Apache-2.0,"Dan Burkert <dan@danburkert.com>, Lucio Franco <luciofranco14@gmail.com>, Casper Meijn <casper@meijn.net>, Tokio Contributors <team@tokio.rs>"
|
|
309
311
|
prost-types,https://github.com/tokio-rs/prost,Apache-2.0,"Dan Burkert <dan@danburkert.com>, Lucio Franco <luciofranco14@gmail.com>, Casper Meijn <casper@meijn.net>, Tokio Contributors <team@tokio.rs>"
|
|
Binary file
|
|
@@ -1624,6 +1624,8 @@ typedef struct ddog_ContextKey {
|
|
|
1624
1624
|
} ddog_ContextKey;
|
|
1625
1625
|
|
|
1626
1626
|
typedef struct ddog_TraceExporter ddog_TraceExporter;
|
|
1627
|
+
typedef struct ddog_TracerSpan ddog_TracerSpan;
|
|
1628
|
+
typedef struct ddog_TracerTraceChunks ddog_TracerTraceChunks;
|
|
1627
1629
|
|
|
1628
1630
|
|
|
1629
1631
|
/**
|
|
@@ -1669,9 +1671,12 @@ typedef struct ddog_TraceExporterResponse ddog_TraceExporterResponse;
|
|
|
1669
1671
|
/**
|
|
1670
1672
|
* A shared runtime that manages PausableWorkers and provides fork safety hooks.
|
|
1671
1673
|
*
|
|
1672
|
-
* The SharedRuntime owns a tokio runtime and tracks PausableWorkers
|
|
1673
|
-
* It provides methods to safely pause workers before forking and
|
|
1674
|
-
* after fork in both parent and child processes.
|
|
1674
|
+
* The SharedRuntime owns a tokio runtime (on native) and tracks PausableWorkers
|
|
1675
|
+
* spawned on it. It provides methods to safely pause workers before forking and
|
|
1676
|
+
* restart them after fork in both parent and child processes.
|
|
1677
|
+
*
|
|
1678
|
+
* On wasm32, no tokio runtime is created. Workers are spawned via `spawn_local`
|
|
1679
|
+
* on the JS event loop.
|
|
1675
1680
|
*
|
|
1676
1681
|
* # Mutex lock order
|
|
1677
1682
|
* When locking both [Self::runtime] and [Self::workers], the mutex must be locked in the order of
|
|
@@ -1730,6 +1735,26 @@ typedef struct ddog_TelemetryClientConfig {
|
|
|
1730
1735
|
ddog_CharSlice parent_session_id;
|
|
1731
1736
|
} ddog_TelemetryClientConfig;
|
|
1732
1737
|
|
|
1738
|
+
/**
|
|
1739
|
+
* FFI-safe bundle of scalar fields for creating a [`TracerSpan`].
|
|
1740
|
+
*
|
|
1741
|
+
* Passed by reference to [`ddog_tracer_span_new`] so that adding or
|
|
1742
|
+
* changing fields does not break the function signature.
|
|
1743
|
+
*/
|
|
1744
|
+
typedef struct ddog_TracerSpanFields {
|
|
1745
|
+
ddog_CharSlice service;
|
|
1746
|
+
ddog_CharSlice name;
|
|
1747
|
+
ddog_CharSlice resource;
|
|
1748
|
+
ddog_CharSlice span_type;
|
|
1749
|
+
uint64_t trace_id_low;
|
|
1750
|
+
uint64_t trace_id_high;
|
|
1751
|
+
uint64_t span_id;
|
|
1752
|
+
uint64_t parent_id;
|
|
1753
|
+
int64_t start;
|
|
1754
|
+
int64_t duration;
|
|
1755
|
+
int32_t error;
|
|
1756
|
+
} ddog_TracerSpanFields;
|
|
1757
|
+
|
|
1733
1758
|
typedef enum ddog_LibraryConfigSource {
|
|
1734
1759
|
DDOG_LIBRARY_CONFIG_SOURCE_LOCAL_STABLE_CONFIG = 0,
|
|
1735
1760
|
DDOG_LIBRARY_CONFIG_SOURCE_FLEET_STABLE_CONFIG = 1,
|
|
@@ -21,11 +21,11 @@ extern "C" {
|
|
|
21
21
|
void ddog_trace_exporter_error_free(struct ddog_TraceExporterError *error);
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* Return a
|
|
25
|
-
* `response` is
|
|
24
|
+
* Return a borrowed view of the response body. The returned slice is
|
|
25
|
+
* only valid as long as `response` is alive. Returns an empty slice
|
|
26
|
+
* when `response` is null or the body is absent.
|
|
26
27
|
*/
|
|
27
|
-
|
|
28
|
-
uintptr_t *out_len);
|
|
28
|
+
ddog_ByteSlice ddog_trace_exporter_response_get_body(const struct ddog_TraceExporterResponse *response);
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Free `response` and all its contents. After being called response will not point to a valid
|
|
@@ -209,6 +209,139 @@ struct ddog_TraceExporterError *ddog_trace_exporter_send(const ddog_TraceExporte
|
|
|
209
209
|
ddog_ByteSlice trace,
|
|
210
210
|
struct ddog_TraceExporterResponse **response_out);
|
|
211
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Create a new span with all scalar fields set.
|
|
214
|
+
*
|
|
215
|
+
* String fields are copied from the provided slices. The `meta` and
|
|
216
|
+
* `metrics` maps start empty; use [`ddog_tracer_span_set_meta`] and
|
|
217
|
+
* [`ddog_tracer_span_set_metric`] to populate them.
|
|
218
|
+
*
|
|
219
|
+
* # Safety
|
|
220
|
+
*
|
|
221
|
+
* `out_handle` must point to valid, writable memory for a `Box<TracerSpan>`.
|
|
222
|
+
* All `CharSlice` fields in `fields` must point to valid memory for their
|
|
223
|
+
* stated length.
|
|
224
|
+
*/
|
|
225
|
+
struct ddog_TraceExporterError *ddog_tracer_span_new(ddog_TracerSpan **out_handle,
|
|
226
|
+
const struct ddog_TracerSpanFields *fields);
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Free a `TracerSpan` and all its contents.
|
|
230
|
+
*
|
|
231
|
+
* After this call the handle is invalid and must not be reused.
|
|
232
|
+
*
|
|
233
|
+
* # Safety
|
|
234
|
+
*
|
|
235
|
+
* `handle` must have been created by [`ddog_tracer_span_new`] and must not
|
|
236
|
+
* be used after this call.
|
|
237
|
+
*/
|
|
238
|
+
void ddog_tracer_span_free(ddog_TracerSpan *handle);
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Add or overwrite a string tag (`meta`) on the span.
|
|
242
|
+
*
|
|
243
|
+
* Both `key` and `value` are copied into the span.
|
|
244
|
+
*
|
|
245
|
+
* # Safety
|
|
246
|
+
*
|
|
247
|
+
* `handle` must be a valid pointer to a `TracerSpan`.
|
|
248
|
+
* `key` and `value` must point to valid UTF-8 memory.
|
|
249
|
+
*/
|
|
250
|
+
struct ddog_TraceExporterError *ddog_tracer_span_set_meta(ddog_TracerSpan *handle,
|
|
251
|
+
ddog_CharSlice key,
|
|
252
|
+
ddog_CharSlice value);
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Add or overwrite a numeric tag (`metric`) on the span.
|
|
256
|
+
*
|
|
257
|
+
* The `key` is copied into the span.
|
|
258
|
+
*
|
|
259
|
+
* # Safety
|
|
260
|
+
*
|
|
261
|
+
* `handle` must be a valid pointer to a `TracerSpan`.
|
|
262
|
+
* `key` must point to valid UTF-8 memory.
|
|
263
|
+
*/
|
|
264
|
+
struct ddog_TraceExporterError *ddog_tracer_span_set_metric(ddog_TracerSpan *handle,
|
|
265
|
+
ddog_CharSlice key,
|
|
266
|
+
double value);
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Create a new empty trace chunks container.
|
|
270
|
+
*
|
|
271
|
+
* `capacity` is a hint for the expected number of chunks; pass 0 if
|
|
272
|
+
* unknown.
|
|
273
|
+
*
|
|
274
|
+
* # Safety
|
|
275
|
+
*
|
|
276
|
+
* `out_handle` must point to valid, writable memory for a
|
|
277
|
+
* `Box<TracerTraceChunks>`.
|
|
278
|
+
*/
|
|
279
|
+
struct ddog_TraceExporterError *ddog_tracer_trace_chunks_new(uintptr_t capacity,
|
|
280
|
+
ddog_TracerTraceChunks **out_handle);
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Free a trace chunks container and all its contents.
|
|
284
|
+
*
|
|
285
|
+
* After this call the handle is invalid and must not be reused.
|
|
286
|
+
*
|
|
287
|
+
* # Safety
|
|
288
|
+
*
|
|
289
|
+
* `handle` must have been created by [`ddog_tracer_trace_chunks_new`].
|
|
290
|
+
*/
|
|
291
|
+
void ddog_tracer_trace_chunks_free(ddog_TracerTraceChunks *handle);
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Start a new chunk (trace) inside the container.
|
|
295
|
+
*
|
|
296
|
+
* Subsequent [`ddog_tracer_trace_chunks_push_span`] calls will append
|
|
297
|
+
* spans to this chunk until the next `begin_chunk` call.
|
|
298
|
+
*
|
|
299
|
+
* `capacity` is a hint for the expected number of spans in this chunk;
|
|
300
|
+
* pass 0 if unknown.
|
|
301
|
+
*
|
|
302
|
+
* # Safety
|
|
303
|
+
*
|
|
304
|
+
* `handle` must be a valid pointer to a `TracerTraceChunks`.
|
|
305
|
+
*/
|
|
306
|
+
struct ddog_TraceExporterError *ddog_tracer_trace_chunks_begin_chunk(ddog_TracerTraceChunks *handle,
|
|
307
|
+
uintptr_t capacity);
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Move a span into the current (last) chunk, consuming the span handle.
|
|
311
|
+
*
|
|
312
|
+
* A chunk must have been started with
|
|
313
|
+
* [`ddog_tracer_trace_chunks_begin_chunk`] before calling this function.
|
|
314
|
+
*
|
|
315
|
+
* # Safety
|
|
316
|
+
*
|
|
317
|
+
* * `handle` must be a valid pointer to a `TracerTraceChunks`.
|
|
318
|
+
* * `span` is consumed and must not be used after this call.
|
|
319
|
+
*/
|
|
320
|
+
struct ddog_TraceExporterError *ddog_tracer_trace_chunks_push_span(ddog_TracerTraceChunks *handle,
|
|
321
|
+
ddog_TracerSpan *span);
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Send trace chunks through a [`TraceExporter`], consuming the chunks.
|
|
325
|
+
*
|
|
326
|
+
* This calls `TraceExporter::send_trace_chunks` which processes stats,
|
|
327
|
+
* serializes in the configured output format, and sends to the agent
|
|
328
|
+
* with retry logic.
|
|
329
|
+
*
|
|
330
|
+
* On success, if `response_out` is non-null, a heap-allocated
|
|
331
|
+
* [`ExporterResponse`] is written there. The caller owns it and must
|
|
332
|
+
* free it with `ddog_trace_exporter_response_free`.
|
|
333
|
+
*
|
|
334
|
+
* # Safety
|
|
335
|
+
*
|
|
336
|
+
* * `exporter` must be a valid `TraceExporter` pointer.
|
|
337
|
+
* * `chunks` is consumed and must not be used after this call.
|
|
338
|
+
* * If `response_out` is non-null it must point to valid writable memory for a
|
|
339
|
+
* `Box<ExporterResponse>`.
|
|
340
|
+
*/
|
|
341
|
+
struct ddog_TraceExporterError *ddog_trace_exporter_send_trace_chunks(const ddog_TraceExporter *exporter,
|
|
342
|
+
ddog_TracerTraceChunks *chunks,
|
|
343
|
+
struct ddog_TraceExporterResponse **response_out);
|
|
344
|
+
|
|
212
345
|
#ifdef __cplusplus
|
|
213
346
|
} // extern "C"
|
|
214
347
|
#endif // __cplusplus
|
|
Binary file
|
|
@@ -8,7 +8,7 @@ includedir=${prefix}/include
|
|
|
8
8
|
|
|
9
9
|
Name: datadog_profiling
|
|
10
10
|
Description: Contains common code used to implement Datadog's Continuous Profilers. (Dynamic linking variant, sets rpath)
|
|
11
|
-
Version:
|
|
11
|
+
Version: 35.0.0
|
|
12
12
|
Requires:
|
|
13
13
|
Libs: -L${libdir} -ldatadog_profiling -Wl,-rpath,${libdir}
|
|
14
14
|
Libs.private:
|
|
@@ -229,6 +229,7 @@ linux-raw-sys,https://github.com/sunfishcode/linux-raw-sys,Apache-2.0 WITH LLVM-
|
|
|
229
229
|
litemap,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers
|
|
230
230
|
lock_api,https://github.com/Amanieu/parking_lot,MIT OR Apache-2.0,Amanieu d'Antras <amanieu@gmail.com>
|
|
231
231
|
log,https://github.com/rust-lang/log,MIT OR Apache-2.0,The Rust Project Developers
|
|
232
|
+
lru,https://github.com/jeromefroe/lru-rs,MIT,Jerome Froelich <jeromefroelic@hotmail.com>
|
|
232
233
|
manual_future,https://github.com/dmarcuse/manual_future,MIT,Dominic Marcuse <dominic@marcuse.us>
|
|
233
234
|
matchers,https://github.com/hawkw/matchers,MIT,Eliza Weisman <eliza@buoyant.io>
|
|
234
235
|
matchit,https://github.com/ibraheemdev/matchit,MIT AND BSD-3-Clause,Ibraheem Ahmed <ibraheem@ibraheem.ca>
|
|
@@ -304,6 +305,7 @@ proc-macro-crate,https://github.com/bkchr/proc-macro-crate,MIT OR Apache-2.0,Bas
|
|
|
304
305
|
proc-macro-error,https://gitlab.com/CreepySkeleton/proc-macro-error,MIT OR Apache-2.0,CreepySkeleton <creepy-skeleton@yandex.ru>
|
|
305
306
|
proc-macro-error-attr,https://gitlab.com/CreepySkeleton/proc-macro-error,MIT OR Apache-2.0,CreepySkeleton <creepy-skeleton@yandex.ru>
|
|
306
307
|
proc-macro2,https://github.com/dtolnay/proc-macro2,MIT OR Apache-2.0,"David Tolnay <dtolnay@gmail.com>, Alex Crichton <alex@alexcrichton.com>"
|
|
308
|
+
proc-macro2-diagnostics,https://github.com/SergioBenitez/proc-macro2-diagnostics,MIT OR Apache-2.0,Sergio Benitez <sb@sergio.bz>
|
|
307
309
|
prost,https://github.com/tokio-rs/prost,Apache-2.0,"Dan Burkert <dan@danburkert.com>, Lucio Franco <luciofranco14@gmail.com>, Casper Meijn <casper@meijn.net>, Tokio Contributors <team@tokio.rs>"
|
|
308
310
|
prost-derive,https://github.com/tokio-rs/prost,Apache-2.0,"Dan Burkert <dan@danburkert.com>, Lucio Franco <luciofranco14@gmail.com>, Casper Meijn <casper@meijn.net>, Tokio Contributors <team@tokio.rs>"
|
|
309
311
|
prost-types,https://github.com/tokio-rs/prost,Apache-2.0,"Dan Burkert <dan@danburkert.com>, Lucio Franco <luciofranco14@gmail.com>, Casper Meijn <casper@meijn.net>, Tokio Contributors <team@tokio.rs>"
|
|
Binary file
|
|
@@ -1624,6 +1624,8 @@ typedef struct ddog_ContextKey {
|
|
|
1624
1624
|
} ddog_ContextKey;
|
|
1625
1625
|
|
|
1626
1626
|
typedef struct ddog_TraceExporter ddog_TraceExporter;
|
|
1627
|
+
typedef struct ddog_TracerSpan ddog_TracerSpan;
|
|
1628
|
+
typedef struct ddog_TracerTraceChunks ddog_TracerTraceChunks;
|
|
1627
1629
|
|
|
1628
1630
|
|
|
1629
1631
|
/**
|
|
@@ -1669,9 +1671,12 @@ typedef struct ddog_TraceExporterResponse ddog_TraceExporterResponse;
|
|
|
1669
1671
|
/**
|
|
1670
1672
|
* A shared runtime that manages PausableWorkers and provides fork safety hooks.
|
|
1671
1673
|
*
|
|
1672
|
-
* The SharedRuntime owns a tokio runtime and tracks PausableWorkers
|
|
1673
|
-
* It provides methods to safely pause workers before forking and
|
|
1674
|
-
* after fork in both parent and child processes.
|
|
1674
|
+
* The SharedRuntime owns a tokio runtime (on native) and tracks PausableWorkers
|
|
1675
|
+
* spawned on it. It provides methods to safely pause workers before forking and
|
|
1676
|
+
* restart them after fork in both parent and child processes.
|
|
1677
|
+
*
|
|
1678
|
+
* On wasm32, no tokio runtime is created. Workers are spawned via `spawn_local`
|
|
1679
|
+
* on the JS event loop.
|
|
1675
1680
|
*
|
|
1676
1681
|
* # Mutex lock order
|
|
1677
1682
|
* When locking both [Self::runtime] and [Self::workers], the mutex must be locked in the order of
|
|
@@ -1730,6 +1735,26 @@ typedef struct ddog_TelemetryClientConfig {
|
|
|
1730
1735
|
ddog_CharSlice parent_session_id;
|
|
1731
1736
|
} ddog_TelemetryClientConfig;
|
|
1732
1737
|
|
|
1738
|
+
/**
|
|
1739
|
+
* FFI-safe bundle of scalar fields for creating a [`TracerSpan`].
|
|
1740
|
+
*
|
|
1741
|
+
* Passed by reference to [`ddog_tracer_span_new`] so that adding or
|
|
1742
|
+
* changing fields does not break the function signature.
|
|
1743
|
+
*/
|
|
1744
|
+
typedef struct ddog_TracerSpanFields {
|
|
1745
|
+
ddog_CharSlice service;
|
|
1746
|
+
ddog_CharSlice name;
|
|
1747
|
+
ddog_CharSlice resource;
|
|
1748
|
+
ddog_CharSlice span_type;
|
|
1749
|
+
uint64_t trace_id_low;
|
|
1750
|
+
uint64_t trace_id_high;
|
|
1751
|
+
uint64_t span_id;
|
|
1752
|
+
uint64_t parent_id;
|
|
1753
|
+
int64_t start;
|
|
1754
|
+
int64_t duration;
|
|
1755
|
+
int32_t error;
|
|
1756
|
+
} ddog_TracerSpanFields;
|
|
1757
|
+
|
|
1733
1758
|
typedef enum ddog_LibraryConfigSource {
|
|
1734
1759
|
DDOG_LIBRARY_CONFIG_SOURCE_LOCAL_STABLE_CONFIG = 0,
|
|
1735
1760
|
DDOG_LIBRARY_CONFIG_SOURCE_FLEET_STABLE_CONFIG = 1,
|