Skip to content

Refactor method message to line protocol #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 12, 2015

Conversation

wdalmut
Copy link
Member

@wdalmut wdalmut commented Sep 12, 2015

This solution should improves the actual message to line protocol conversion strategy and it includes a new feature in order to set point-to-point capture timing

$client->mark([
  "time" => "2009-01-01T10:28:00Z", //All point use this 
  "points" => [ ... ]
  ...
]);

In this PR you can specify time for single measured point

$client->mark([ 
  "points" => [
    [
      "measurement" => "cpu",
      "time" => "2009-11-10T23:00:00Z",
      "fields" => [
        // ...
      ]
  ]
]);

It is also possibile to mix previous solution in order to apply a base timing to existing points without a time capture

$client->mark([ 
  "time" => "2009-11-10T22:59:00Z",
  "points" => [
    [
      "measurement" => "cpu", // time 23:00
      "time" => "2009-11-10T23:00:00Z",
      "fields" => [
        // ...
      ]
  ]
    [
      "measurement" => "cpu", // time 22:59 (inherited)
      "fields" => [
        // ...
      ]
  ]

]);

This solution should improves the actual message to line protocol conversion strategy and it includes a new feature in order to set point-to-point capture timing

```php
$client->mark([
  "time" => "2009-01-01T10:28:00Z", //All point use this
  "points" => [ ... ]
  ...
]);
```

In this PR you can specify time for single measured point

```php
$client->mark([
  "points" => [
    [
      "measurement" => "cpu",
      "time" => "2009-11-10T23:00:00Z",
      "fields" => [
        // ...
      ]
  ]
]);
```

It is also possibile to mix previous solution in order to apply a base timing to existing points without a time capture
@wdalmut wdalmut force-pushed the feature/refactor-message-to-line-protocol branch from 0b95140 to bdc5787 Compare September 12, 2015 16:58
@scrutinizer-notifier
Copy link

The inspection completed: 1 updated code elements

@wdalmut wdalmut self-assigned this Sep 12, 2015
wdalmut added a commit that referenced this pull request Sep 12, 2015
…rotocol

Refactored method message to line protocol
@wdalmut wdalmut merged commit 1fe2165 into master Sep 12, 2015
@wdalmut wdalmut deleted the feature/refactor-message-to-line-protocol branch September 12, 2015 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants