metrics

package
v0.0.0-...-80ae6ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

  • Copyright (c) 2018 VMware, Inc. *
  • Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
  • associated documentation files (the "Software"), to deal in the Software without restriction, including
  • without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  • copies of the Software, and to permit persons to whom the Software is furnished to do
  • so, subject to the following conditions: *
  • The above copyright notice and this permission notice shall be included in all copies or substantial
  • portions of the Software. *
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
  • NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  • IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  • WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  • SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The implementation is derived from https://github.com/patrobinson/gokini

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

  • Copyright (c) 2018 VMware, Inc. *
  • Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
  • associated documentation files (the "Software"), to deal in the Software without restriction, including
  • without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  • copies of the Software, and to permit persons to whom the Software is furnished to do
  • so, subject to the following conditions: *
  • The above copyright notice and this permission notice shall be included in all copies or substantial
  • portions of the Software. *
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
  • NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  • IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  • WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  • SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The implementation is derived from https://github.com/patrobinson/gokini

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

  • Copyright (c) 2018 VMware, Inc. *
  • Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
  • associated documentation files (the "Software"), to deal in the Software without restriction, including
  • without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  • copies of the Software, and to permit persons to whom the Software is furnished to do
  • so, subject to the following conditions: *
  • The above copyright notice and this permission notice shall be included in all copies or substantial
  • portions of the Software. *
  • THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
  • NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  • IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  • WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  • SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The implementation is derived from https://github.com/patrobinson/gokini

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudWatchMonitoringService

type CloudWatchMonitoringService struct {
	Namespace     string
	KinesisStream string
	WorkerID      string
	Region        string
	Credentials   *credentials.Credentials

	// control how often to pusblish to CloudWatch
	MetricsBufferTimeMillis int
	MetricsMaxQueueSize     int
	// contains filtered or unexported fields
}

func (*CloudWatchMonitoringService) IncrBytesProcessed

func (cw *CloudWatchMonitoringService) IncrBytesProcessed(shard string, count int64)

func (*CloudWatchMonitoringService) IncrRecordsProcessed

func (cw *CloudWatchMonitoringService) IncrRecordsProcessed(shard string, count int)

func (*CloudWatchMonitoringService) Init

func (*CloudWatchMonitoringService) LeaseGained

func (cw *CloudWatchMonitoringService) LeaseGained(shard string)

func (*CloudWatchMonitoringService) LeaseLost

func (cw *CloudWatchMonitoringService) LeaseLost(shard string)

func (*CloudWatchMonitoringService) LeaseRenewed

func (cw *CloudWatchMonitoringService) LeaseRenewed(shard string)

func (*CloudWatchMonitoringService) MillisBehindLatest

func (cw *CloudWatchMonitoringService) MillisBehindLatest(shard string, millSeconds float64)

func (*CloudWatchMonitoringService) RecordGetRecordsTime

func (cw *CloudWatchMonitoringService) RecordGetRecordsTime(shard string, time float64)

func (*CloudWatchMonitoringService) RecordProcessRecordsTime

func (cw *CloudWatchMonitoringService) RecordProcessRecordsTime(shard string, time float64)

func (*CloudWatchMonitoringService) Shutdown

func (cw *CloudWatchMonitoringService) Shutdown()

func (*CloudWatchMonitoringService) Start

func (cw *CloudWatchMonitoringService) Start() error

type MonitoringConfiguration

type MonitoringConfiguration struct {
	MonitoringService string // Type of monitoring to expose. Supported types are "prometheus"
	Region            string
	Prometheus        PrometheusMonitoringService
	CloudWatch        CloudWatchMonitoringService
	// contains filtered or unexported fields
}

MonitoringConfiguration allows you to configure how record processing metrics are exposed

func (*MonitoringConfiguration) GetMonitoringService

func (m *MonitoringConfiguration) GetMonitoringService() MonitoringService

func (*MonitoringConfiguration) Init

func (m *MonitoringConfiguration) Init(nameSpace, streamName string, workerID string) error

type MonitoringService

type MonitoringService interface {
	Init() error
	Start() error
	IncrRecordsProcessed(string, int)
	IncrBytesProcessed(string, int64)
	MillisBehindLatest(string, float64)
	LeaseGained(string)
	LeaseLost(string)
	LeaseRenewed(string)
	RecordGetRecordsTime(string, float64)
	RecordProcessRecordsTime(string, float64)
	Shutdown()
}

type PrometheusMonitoringService

type PrometheusMonitoringService struct {
	ListenAddress string

	Namespace     string
	KinesisStream string
	WorkerID      string
	Region        string
	// contains filtered or unexported fields
}

PrometheusMonitoringService to start Prometheus as metrics system. It might be trick if the service onboarding with KCL also uses Prometheus. Therefore, we should start cloudwatch metrics by default instead.

func (*PrometheusMonitoringService) IncrBytesProcessed

func (p *PrometheusMonitoringService) IncrBytesProcessed(shard string, count int64)

func (*PrometheusMonitoringService) IncrRecordsProcessed

func (p *PrometheusMonitoringService) IncrRecordsProcessed(shard string, count int)

func (*PrometheusMonitoringService) Init

func (*PrometheusMonitoringService) LeaseGained

func (p *PrometheusMonitoringService) LeaseGained(shard string)

func (*PrometheusMonitoringService) LeaseLost

func (p *PrometheusMonitoringService) LeaseLost(shard string)

func (*PrometheusMonitoringService) LeaseRenewed

func (p *PrometheusMonitoringService) LeaseRenewed(shard string)

func (*PrometheusMonitoringService) MillisBehindLatest

func (p *PrometheusMonitoringService) MillisBehindLatest(shard string, millSeconds float64)

func (*PrometheusMonitoringService) RecordGetRecordsTime

func (p *PrometheusMonitoringService) RecordGetRecordsTime(shard string, time float64)

func (*PrometheusMonitoringService) RecordProcessRecordsTime

func (p *PrometheusMonitoringService) RecordProcessRecordsTime(shard string, time float64)

func (*PrometheusMonitoringService) Shutdown

func (p *PrometheusMonitoringService) Shutdown()

func (*PrometheusMonitoringService) Start

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL