class NewRelic::Segment

Overview

A NewRelic::Segment encapsulates a call to NewRelicExt.start_segment, and all of the data management around it.

Defined in:

new_relic/segment.cr
new_relic/segment/datastore_params.cr
new_relic/segment/external_params.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(transaction : Transaction, product : String, collection : String | Nil, operation : String | Nil, host : String | Nil, port_path_or_id : String | Nil, database_name : String | Nil, query : String | Nil) #

[View source]
def self.new(transaction : Transaction, uri : String, procedure : String | Nil, library : String | Nil) #

[View source]
def self.new(transaction : Transaction, label : String, category : String) #

[View source]

Instance Method Detail

def destroy! #

Destroy the underlying resources that were allocated for this object. This must be called before this object goes out of scope to avoid memory leaks from resources that have not been freed. Use the block form of the segment support (NewRelic::Transaction.segment()) to ensure that these resources are freed.


[View source]
def parent=(val) #

[View source]
def parent_root! #

[View source]
def pointer : Pointer(NewRelicExt::SegmentT) #

Return a pointer to the C structure that corresponds to the Segment.


[View source]
def segment : NewRelicExt::SegmentT #

[View source]
def structure : NewRelicExt::SegmentT #

Return the C structure that corresponds to the Segment.


[View source]
def timing(start_time, duration) #

[View source]
def transaction : Transaction #

[View source]