-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redesign crash tracker to behave as regular object
- Loading branch information
Showing
4 changed files
with
221 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,38 @@ | ||
module Datadog | ||
module Profiling | ||
class CrashTracker | ||
def self.build_crash_tracker: ( | ||
exporter_configuration: [:agentless | :agent, untyped], | ||
tags: ::Hash[::String, ::String], | ||
?path_to_crashtracking_receiver_binary: ::String, | ||
) -> CrashTracker? | ||
type exporter_configuration_array = [:agentless | :agent, untyped] | ||
|
||
private | ||
|
||
attr_reader exporter_configuration: exporter_configuration_array | ||
attr_reader tags_as_array: ::Array[[::String, ::String]] | ||
attr_reader path_to_crashtracking_receiver_binary: ::String | ||
|
||
public | ||
|
||
def initialize: ( | ||
exporter_configuration: [:agentless | :agent, untyped], | ||
exporter_configuration: exporter_configuration_array, | ||
tags: ::Hash[::String, ::String], | ||
path_to_crashtracking_receiver_binary: ::String, | ||
tags_as_array: ::Array[[::String, ::String]], | ||
) -> void | ||
|
||
def self._native_start_crashtracker: ( | ||
exporter_configuration: [:agentless | :agent, untyped], | ||
path_to_crashtracking_receiver_binary: ::String, | ||
def start: -> void | ||
def stop: -> void | ||
def reset_after_fork: -> void | ||
|
||
private | ||
|
||
def start_or_update_on_fork: (action: :start | :update_on_fork) -> void | ||
|
||
def self._native_start_or_update_on_fork: ( | ||
action: :start | :update_on_fork, | ||
exporter_configuration: exporter_configuration_array, | ||
tags_as_array: ::Array[[::String, ::String]], | ||
path_to_crashtracking_receiver_binary: ::String, | ||
) -> void | ||
|
||
def self._native_stop: -> void | ||
end | ||
end | ||
end |
Oops, something went wrong.