Skip to content

Commit

Permalink
Added changelog and version bump that correlate to PR #15 (#16)
Browse files Browse the repository at this point in the history
* Added changelog and version bump that correlate to PR #15

* Fix misspellings

* Added changelog and version bump that correlate to PR #15

* Update CHANGELOG.md

Add misspelling fix
  • Loading branch information
Corbin Phelps authored Sep 18, 2018
1 parent 1af054d commit 20f7a05
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 19 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 0.1.2 - 2018-09-18
### Changed
- Changed sample file to be clearer for users to configure
- Correct misspellings

## 0.1.1 - 2018-08-24
### Fixed
- Exchange Binding Metric Data would show up as Queue Metric Data. While the bug showed exchange bindings as queue bindings, it would always show a count of zero too

## 0.1.0 - 2018-08-24
### Added
- Initial version: Includes Metrics, Inventory, and Events data
- Initial version: Includes Metrics, Inventory, and Events data
2 changes: 1 addition & 1 deletion src/args/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package args

import sdkArgs "github.com/newrelic/infra-integrations-sdk/args"

// ArgumentList is the raw arguments passed into the intgration via YAML, CLI args, or ENV variables
// ArgumentList is the raw arguments passed into the integration via YAML, CLI args, or ENV variables
type ArgumentList struct {
sdkArgs.DefaultArgumentList
Hostname string `default:"localhost" help:"Hostname or IP where RabbitMQ Management Plugin is running."`
Expand Down
2 changes: 1 addition & 1 deletion src/args/rabbitmq_args.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (args *RabbitMQArguments) IncludeEntity(entityName string, entityType strin
}
}

// includeExchange returns true if exchage should be included; false otherwise
// includeExchange returns true if exchange should be included; false otherwise
func (args *RabbitMQArguments) includeExchange(exchangeName string) bool {
return includeName(exchangeName, args.Exchanges, args.ExchangesRegexes)
}
Expand Down
2 changes: 1 addition & 1 deletion src/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func Test_ensureClient_CannotCreateClient(t *testing.T) {
return
}

// If this is the first time this test method is ran, re-execute it telling it to pefrom the actual method call.
// If this is the first time this test method is ran, re-execute it telling it to perform the actual method call.
// Then test the result of that, which should be an os.Exit(2).
// The downside to this is the ensureClient() will not show full coverage when it actually does (since it's ran as a sub-test)
cmd := exec.Command(os.Args[0], "-test.run=Test_ensureClient_CannotCreateClient")
Expand Down
2 changes: 1 addition & 1 deletion src/data/definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/newrelic/infra-integrations-sdk/integration"
)

// EntityData is capabile of reporting it's own data to inventory
// EntityData is capable of reporting it's own data to inventory
type EntityData interface {
GetEntity(integration *integration.Integration) (*integration.Entity, []metric.Attribute, error)
EntityVhost() string
Expand Down
23 changes: 12 additions & 11 deletions src/data/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/newrelic/nri-rabbitmq/src/data/consts"
)

// CreateEntity will create an entity and metricNamespace attributes with approprate name/namespace values if the entity isn't filtered
// CreateEntity will create an entity and metricNamespace attributes with appropriate name/namespace values if the entity isn't filtered
func CreateEntity(rabbitmqIntegration *integration.Integration, entityName string, entityType string, vhost string) (entity *integration.Entity, metricNamespace []metric.Attribute, err error) {
name := cleanEntityName(entityName, entityType)
namespace := entityType
Expand Down Expand Up @@ -49,16 +49,17 @@ func joinVhostName(vhost, name string) string {

// SetInventoryItem sets an inventory item in a consistent way
func SetInventoryItem(entity *integration.Entity, category, key string, value interface{}) {
if entity != nil && key != "" && value != nil {
if category != "" {
key = category + "/" + key
}
if err := entity.SetInventoryItem(key, "value", value); err != nil {
if entity.Metadata == nil {
log.Warn("Error setting inventory [%s] on LocalEntity: %v", key, err)
} else {
log.Warn("Error setting inventory [%s] on [%s]: %v", key, entity.Metadata.Name, err)
}
if entity == nil || key == "" || value == nil {
return
}
if category != "" {
key = category + "/" + key
}
if err := entity.SetInventoryItem(key, "value", value); err != nil {
if entity.Metadata == nil {
log.Warn("Error setting inventory [%s] on LocalEntity: %v", key, err)
} else {
log.Warn("Error setting inventory [%s] on [%s]: %v", key, entity.Metadata.Name, err)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/inventory/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/newrelic/nri-rabbitmq/src/data/consts"
)

// PopulateClusterInventory populates the cluse entity with appropriate inventory data
// PopulateClusterInventory populates the cluster entity with appropriate inventory data
func PopulateClusterInventory(integrationData *integration.Integration, overviewData *data.OverviewData) {
if overviewData == nil || overviewData.ClusterName == "" {
return
Expand Down
2 changes: 1 addition & 1 deletion src/inventory/inventory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestCollectInventory(t *testing.T) {
prevOsOpen := osOpen
osOpen = errorOsOpen
CollectInventory(i, nodesData)
assert.Empty(t, i.Entities, "CollectInventory should create anythign when config file fails to open")
assert.Empty(t, i.Entities, "CollectInventory should create anything when config file fails to open")
osOpen = prevOsOpen

CollectInventory(i, nodesData)
Expand Down
2 changes: 1 addition & 1 deletion src/rabbitmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

const (
integrationName = "com.newrelic.rabbitmq"
integrationVersion = "0.1.1"
integrationVersion = "0.1.2"
)

func main() {
Expand Down

0 comments on commit 20f7a05

Please sign in to comment.