opencensus-datadog 0.1.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8462b246aa741ba124db1c44eace150ef53d8d994673f80a980e2f0f7c82f94
4
- data.tar.gz: 2123122f5ab6d8c475f56243bcdd1c8ec2f24f5acbb34e991873ca5aa0d7cec3
3
+ metadata.gz: b53f356d8ac582bec1ba3fee8491e9b78cd88948b199f0b71f284a7692117971
4
+ data.tar.gz: 82c901fe1be8323cc6bc7886a8a8bc052349ca1567b5ebba4d035e8f28fd200c
5
5
  SHA512:
6
- metadata.gz: b35dd72c375af2796fd62005c9acb007b32b1d39de34cde2169b98f9713136d0764abe4179186c058417f6a1fa6e6a742c77b0391cdbe8ee738065a73de24b39
7
- data.tar.gz: 586fb64651a2c7a260ad169056928eb9e4e8b1208f5bd33c339ec891d3163c27c24b334c2f9e25ec8e1d469d73a28d63c0101f06fcb453e1d7a656d38d37293e
6
+ metadata.gz: a65a5046f9949610b32d19c4be70c4582095beea6e6f90280cd06fce81ab635ed4b2efa180593f500b4a2fe0c9c8345eaba9b5c53640edb47706f28e8ea15b64
7
+ data.tar.gz: f8ce6387d8aec2293e5dcd16a2c6ba3ecad3eef322386f1d1d1538f8d469be3f42b904d114559210c425dc102478bc1f0670098b837fc8282a45892c898e38d2
data/.travis.yml CHANGED
@@ -1,5 +1,8 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.4.1
5
- before_install: gem install bundler -v 1.16.2
4
+ - 2.7
5
+ - 3.0
6
+ - 3.1
7
+ script:
8
+ - bundle exec rspec
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Ruby Datadog APM Exporter for OpenCensus
1
+ # Ruby Datadog APM Exporter for OpenCensus [![Build Status](https://travis-ci.org/munisystem/opencensus-datadog.svg?branch=master)](https://travis-ci.org/munisystem/opencensus-datadog)
2
2
 
3
- This library is the implementation of [OpenCensus](https://census-instrumentation/opencensus-ruby) exporter that transfer metrics to [Datadog APM](https://www.datadoghq.com/apm/).
3
+ This library is the implementation of [OpenCensus](https://github.com/census-instrumentation/opencensus-ruby) exporter that transfer metrics to [Datadog APM](https://www.datadoghq.com/apm/).
4
4
  It is depending on Datadog Agent v6.
5
5
 
6
6
  ## Installation
@@ -24,21 +24,21 @@ Register this gem using OpenCensus configuration:
24
24
 
25
25
  ```ruby
26
26
  OpenCensus.configure do |c|
27
- c.trace.exporter = OpenCensus::Trace::Integrations::Datadog.new
27
+ c.trace.exporter = OpenCensus::Trace::Exporters::Datadog.new
28
28
  end
29
29
  ```
30
30
 
31
31
  You can also use the following code if using Ruby on Rails:
32
32
 
33
33
  ```ruby
34
- config.opencensus.trace.exporter = OpenCensus::Trace::Integrations::Datadog.new
34
+ config.opencensus.trace.exporter = OpenCensus::Trace::Exporters::Datadog.new
35
35
  ```
36
36
 
37
37
  By default, this gem sends metrics to the Datadog Agent at `http://localhost:8126`. You can send to different host or port.
38
38
 
39
39
  ```ruby
40
40
  OpenCensus.configure do |c|
41
- c.trace.exporter = OpenCensus::Trace::Integrations::Datadog.new \
41
+ c.trace.exporter = OpenCensus::Trace::Exporters::Datadog.new \
42
42
  agent_hostname: '192.168.1.1',
43
43
  agent_port: '1234'
44
44
  end
@@ -1,5 +1,5 @@
1
1
  module OpenCensus
2
2
  module Datadog
3
- VERSION = "0.1.1"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -1,6 +1,5 @@
1
- require 'ddtrace/ext/distributed'
2
- require 'ddtrace/ext/priority'
3
- require 'ddtrace/ext/errors'
1
+ require 'datadog/tracing/metadata/ext'
2
+ require 'datadog/tracing/sampling/ext'
4
3
 
5
4
  module OpenCensus
6
5
  module Trace
@@ -13,7 +12,7 @@ module OpenCensus
13
12
  DATADOG_SPAN_TYPE_KEY = 'span.type'.freeze
14
13
  DATADOG_SERVICE_NAME_KEY = 'service.name'.freeze
15
14
  DATADOG_RESOURCE_NAME_KEY = 'resource.name'.freeze
16
- DATADOG_SAMPLING_PRIORITY_KEY = ::Datadog::Ext::DistributedTracing::SAMPLING_PRIORITY_KEY
15
+ DATADOG_SAMPLING_PRIORITY_KEY = ::Datadog::Tracing::Metadata::Ext::Distributed::TAG_SAMPLING_PRIORITY
17
16
 
18
17
  STATUS_DESCRIPTION_KEY = 'opencensus.status_description'.freeze
19
18
 
@@ -57,7 +56,7 @@ module OpenCensus
57
56
  duration: ((span.end_time.to_f - span.start_time.to_f) * 1e9).to_i,
58
57
  }
59
58
 
60
- dd_span[:metrics][DATADOG_SAMPLING_PRIORITY_KEY] = ::Datadog::Ext::Priority::AUTO_KEEP
59
+ dd_span[:metrics][DATADOG_SAMPLING_PRIORITY_KEY] = ::Datadog::Tracing::Sampling::Ext::Priority::AUTO_KEEP
61
60
 
62
61
  convert_status(dd_span, span.status)
63
62
 
@@ -92,7 +91,7 @@ module OpenCensus
92
91
  status_key = STATUS_DESCRIPTION_KEY
93
92
  return if status.nil?
94
93
  if status.code != 0 then
95
- status_key = ::Datadog::Ext::Errors::MSG
94
+ status_key = ::Datadog::Tracing::Metadata::Ext::Errors::TAG_MSG
96
95
  dd_span[:error] = 1
97
96
  code = status.code.to_i
98
97
  return if code < 0 || code >= CANONICAL_CODES.length
@@ -6,12 +6,12 @@ require "opencensus/datadog/version"
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "opencensus-datadog"
8
8
  spec.version = OpenCensus::Datadog::VERSION
9
- spec.authors = ["Yuichi Saito"]
10
- spec.email = ["munisystem@gmail.com"]
9
+ spec.authors = ["Wantedly, Inc.", "Yuichi Saito"]
10
+ spec.email = ["dev@wantedly.com", "munisystem@gmail.com"]
11
11
 
12
12
  spec.summary = "Datadog APM exporter for OpenCensus"
13
13
  spec.description = "Datadog APM exporter for OpenCensus"
14
- spec.homepage = "https://github.com/munisystem/opencensus-datadog"
14
+ spec.homepage = "https://github.com/wantedly/opencensus-datadog"
15
15
  spec.license = "MIT"
16
16
 
17
17
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
@@ -23,9 +23,9 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_dependency 'msgpack'
25
25
  spec.add_dependency 'opencensus'
26
- spec.add_dependency 'ddtrace'
26
+ spec.add_dependency 'ddtrace', '~> 1.0'
27
27
 
28
- spec.add_development_dependency "bundler", "~> 1.16"
28
+ spec.add_development_dependency "bundler", ">= 1.16", "< 3.0"
29
29
  spec.add_development_dependency "rake", "~> 10.0"
30
30
  spec.add_development_dependency "rspec", "~> 3.0"
31
31
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opencensus-datadog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Wantedly, Inc.
7
8
  - Yuichi Saito
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2018-09-12 00:00:00.000000000 Z
12
+ date: 2023-03-09 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: msgpack
@@ -42,30 +43,36 @@ dependencies:
42
43
  name: ddtrace
43
44
  requirement: !ruby/object:Gem::Requirement
44
45
  requirements:
45
- - - ">="
46
+ - - "~>"
46
47
  - !ruby/object:Gem::Version
47
- version: '0'
48
+ version: '1.0'
48
49
  type: :runtime
49
50
  prerelease: false
50
51
  version_requirements: !ruby/object:Gem::Requirement
51
52
  requirements:
52
- - - ">="
53
+ - - "~>"
53
54
  - !ruby/object:Gem::Version
54
- version: '0'
55
+ version: '1.0'
55
56
  - !ruby/object:Gem::Dependency
56
57
  name: bundler
57
58
  requirement: !ruby/object:Gem::Requirement
58
59
  requirements:
59
- - - "~>"
60
+ - - ">="
60
61
  - !ruby/object:Gem::Version
61
62
  version: '1.16'
63
+ - - "<"
64
+ - !ruby/object:Gem::Version
65
+ version: '3.0'
62
66
  type: :development
63
67
  prerelease: false
64
68
  version_requirements: !ruby/object:Gem::Requirement
65
69
  requirements:
66
- - - "~>"
70
+ - - ">="
67
71
  - !ruby/object:Gem::Version
68
72
  version: '1.16'
73
+ - - "<"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.0'
69
76
  - !ruby/object:Gem::Dependency
70
77
  name: rake
71
78
  requirement: !ruby/object:Gem::Requirement
@@ -96,6 +103,7 @@ dependencies:
96
103
  version: '3.0'
97
104
  description: Datadog APM exporter for OpenCensus
98
105
  email:
106
+ - dev@wantedly.com
99
107
  - munisystem@gmail.com
100
108
  executables: []
101
109
  extensions: []
@@ -119,7 +127,7 @@ files:
119
127
  - lib/opencensus/trace/exporters/datadog/transport.rb
120
128
  - lib/opencensus/trace/exporters/datadog/worker.rb
121
129
  - opencensus-datadog.gemspec
122
- homepage: https://github.com/munisystem/opencensus-datadog
130
+ homepage: https://github.com/wantedly/opencensus-datadog
123
131
  licenses:
124
132
  - MIT
125
133
  metadata: {}
@@ -138,8 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
146
  - !ruby/object:Gem::Version
139
147
  version: '0'
140
148
  requirements: []
141
- rubyforge_project:
142
- rubygems_version: 2.7.3
149
+ rubygems_version: 3.1.6
143
150
  signing_key:
144
151
  specification_version: 4
145
152
  summary: Datadog APM exporter for OpenCensus