-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef47580
commit 43a5027
Showing
12 changed files
with
210 additions
and
216 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package delta | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/wavefronthq/wavefront-sdk-go/internal" | ||
"github.com/wavefronthq/wavefront-sdk-go/internal/metric" | ||
) | ||
|
||
func Line(name string, value float64, source string, tags map[string]string, defaultSource string) (string, error) { | ||
if name == "" { | ||
return "", fmt.Errorf("empty metric name") | ||
} | ||
if !internal.HasDeltaPrefix(name) { | ||
name = internal.DeltaCounterName(name) | ||
} | ||
return metric.Line(name, value, 0, source, tags, defaultSource) | ||
} |
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
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
Oops, something went wrong.