Skip to content
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

metrics: add more metrics descriptions #2695

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

erain
Copy link
Contributor

@erain erain commented Oct 16, 2020

  • also implemented flb_sds_cat_auto so that we don't need to manually
    counting the length of the string.

Signed-off-by: Yu Yi [email protected]


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

Documentation

  • [N/A] Documentation required for this feature

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

@erain
Copy link
Contributor Author

erain commented Oct 16, 2020

Example configuration file for the change

Dummy configuration, mostly.

[SERVICE]
    Flush        1
    Daemon       Off
    Log_Level    debug

[INPUT]
    Name dummy

[OUTPUT]
    Name http
    Match *
    Host 127.0.0.1
    Port 8080
    Uri /post

Valgrind output that shows no leaks or memory corruption was found (with debug output)

==10572== Memcheck, a memory error detector
==10572== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==10572== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==10572== Command: ./bin/fluent-bit -c fluent-bit.config
==10572==
Fluent Bit v1.7.0
* Copyright (C) 2019-2020 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

[2020/10/16 21:18:51] [ info] Configuration:
[2020/10/16 21:18:51] [ info]  flush time     | 1.000000 seconds
[2020/10/16 21:18:51] [ info]  grace          | 5 seconds
[2020/10/16 21:18:51] [ info]  daemon         | 0
[2020/10/16 21:18:51] [ info] ___________
[2020/10/16 21:18:51] [ info]  inputs:
[2020/10/16 21:18:51] [ info]      dummy
[2020/10/16 21:18:51] [ info] ___________
[2020/10/16 21:18:51] [ info]  filters:
[2020/10/16 21:18:51] [ info] ___________
[2020/10/16 21:18:51] [ info]  outputs:
[2020/10/16 21:18:51] [ info]      stackdriver.0
[2020/10/16 21:18:51] [ info]      http.1
[2020/10/16 21:18:51] [ info] ___________
[2020/10/16 21:18:51] [ info]  collectors:
[2020/10/16 21:18:51] [ info] [engine] started (pid=10572)
[2020/10/16 21:18:51] [debug] [engine] coroutine stack size: 24576 bytes (24.0K)
[2020/10/16 21:18:51] [debug] [storage] [cio stream] new stream registered: dummy.0
[2020/10/16 21:18:52] [ info] [storage] version=1.0.6, initializing...
[2020/10/16 21:18:52] [ info] [storage] in-memory
[2020/10/16 21:18:52] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
[2020/10/16 21:18:53] [debug] [output:stackdriver:stackdriver.0] JWT signature:
eyJhbGciOiAiUlMyNTYiLCAidHlwIjogIkpXVCJ9.eyJpc3MiOiAib255eC1vYnNlcnZhYmlsaXR5LXlpeXVAeWl5dS1na2UtZGV2LmlhbS5nc2VydmljZWFjY291bnQuY29tIiwgInNjb3BlIjogImh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL2F1dGgvbG9nZ2luZy53cml0ZSIsICJhdWQiOiAiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vb2F1dGgyL3Y0L3Rva2VuIiwgImV4cCI6IDE2MDI4ODYxMzIsICJpYXQiOiAxNjAyODgzMTMyfQ.IlVx5eLbXhzMqHvNWDqhSfP5O6mG0oIDiYJla4e_GrHVb4fTuTjuJ7Kz0brAfNzGO92p5YyX4jvEXcDx-jVPUpG4AveOTYsVK2ncPmKOJREkiaFtNtSE3I2B9-nG90GEs_vWqVwnd87xkHTiZ4tKnLNiC7HyBWyxJK_vQud1atwGtYxk2fTxALc2OHFiixkrOLq_hR8HdwfUqhhRakRwobqKBdxotqilMNHiceZlcr_wLEF39LBozQjNwAnANR0cRvlUCmdrlDQAI4Hys7AUZ60_Y-xw9Mi1pOHk0xwqIE-jGhAyxqymBN9H0sROtkqvKZ8iuELMlMGjKUh62ax14w
[2020/10/16 21:18:54] [ info] [oauth2] HTTP Status=200
[2020/10/16 21:18:54] [debug] [oauth2] payload:
{"access_token":"ya29.c.Ko8B4QdfdZgqrmAq5mzpl9EIxVN9YTuh0noHvug8kWx3z3HdZEBeALWLvM7wIpyi1qAslpOzif0l37Ofvx522Vq7OI2JZyAMC12XZt4rkrYKy88gQ2bCeSYBYwv6avtKSoS0ForIqVFoIHIiqSiJ__N0jRlbLbeCzAfO79arskmq0TLph9o-lMasvCxCDQydYgE","expires_in":3599,"token_type":"Bearer"}
[2020/10/16 21:18:54] [ info] [oauth2] access token from 'www.googleapis.com:443' retrieved
[2020/10/16 21:18:54] [debug] [router] match rule dummy.0:stackdriver.0
[2020/10/16 21:18:54] [debug] [router] match rule dummy.0:http.1
[2020/10/16 21:18:54] [ info] [sp] stream processor started
==10572== Warning: client switching stacks?  SP change: 0x6805948 --> 0x7d60330
==10572==          to suppress, use: --max-stackframe=22391272 or greater
==10572== Warning: client switching stacks?  SP change: 0x7d602a8 --> 0x6805948
==10572==          to suppress, use: --max-stackframe=22391136 or greater
==10572== Warning: client switching stacks?  SP change: 0x6805948 --> 0x7d602a8
==10572==          to suppress, use: --max-stackframe=22391136 or greater
==10572==          further instances of this message will not be shown.
[2020/10/16 21:18:55] [debug] [task] created task=0x7d59ea0 id=0 OK
[2020/10/16 21:18:56] [debug] [output:stackdriver:stackdriver.0] [logging.googleapis.com/monitored_resource] not found in the payload
[2020/10/16 21:18:56] [debug] [output:stackdriver:stackdriver.0] HTTP Status=200
[2020/10/16 21:18:56] [debug] [upstream] KA connection #26 to logging.googleapis.com:443 is now available
[2020/10/16 21:18:56] [ info] [output:http:http.1] 127.0.0.1:8080, HTTP status=200
{
  "args": {},
  "data": "data:application/octet-stream;base64,ktcAX4oOPh5KdXeBp21lc3NhZ2WlZHVtbXk=",
  "files": {},
  "form": {},
  "headers": {
    "Content-Length": "26",
    "Content-Type": "application/msgpack",
    "Host": "127.0.0.1:8080",
    "User-Agent": "Fluent-Bit"
  },
  "json": null,
  "origin": "172.17.0.1",
  "url": "http://127.0.0.1:8080/post"
}

[2020/10/16 21:18:56] [debug] [upstream] KA connection #27 to 127.0.0.1:8080 is now available
[2020/10/16 21:18:56] [debug] [task] destroy task=0x7d59ea0 (task_id=0)
[2020/10/16 21:18:56] [debug] [task] created task=0x81530f0 id=0 OK
[2020/10/16 21:18:56] [debug] [upstream] KA connection #26 to logging.googleapis.com:443 has been assigned (recycled)
[2020/10/16 21:18:56] [debug] [output:stackdriver:stackdriver.0] [logging.googleapis.com/monitored_resource] not found in the payload
[2020/10/16 21:18:56] [debug] [output:stackdriver:stackdriver.0] HTTP Status=200
[2020/10/16 21:18:56] [debug] [upstream] KA connection #26 to logging.googleapis.com:443 is now available
[2020/10/16 21:18:56] [debug] [upstream] KA connection #27 to 127.0.0.1:8080 has been assigned (recycled)
[2020/10/16 21:18:56] [ info] [output:http:http.1] 127.0.0.1:8080, HTTP status=200
{
  "args": {},
  "data": "data:application/octet-stream;base64,ktcAX4oOQBkJvSuBp21lc3NhZ2WlZHVtbXk=",
  "files": {},
  "form": {},
  "headers": {
    "Content-Length": "26",
    "Content-Type": "application/msgpack",
    "Host": "127.0.0.1:8080",
    "User-Agent": "Fluent-Bit"
  },
  "json": null,
  "origin": "172.17.0.1",
  "url": "http://127.0.0.1:8080/post"
}

[2020/10/16 21:18:56] [debug] [upstream] KA connection #27 to 127.0.0.1:8080 is now available
[2020/10/16 21:18:56] [debug] [task] destroy task=0x81530f0 (task_id=0)
[2020/10/16 21:18:57] [debug] [task] created task=0x81ba9c0 id=0 OK
[2020/10/16 21:18:57] [debug] [upstream] KA connection #26 to logging.googleapis.com:443 has been assigned (recycled)
[2020/10/16 21:18:57] [debug] [output:stackdriver:stackdriver.0] [logging.googleapis.com/monitored_resource] not found in the payload
[2020/10/16 21:18:57] [debug] [output:stackdriver:stackdriver.0] HTTP Status=200
[2020/10/16 21:18:57] [debug] [upstream] KA connection #26 to logging.googleapis.com:443 is now available
[2020/10/16 21:18:57] [debug] [upstream] KA connection #27 to 127.0.0.1:8080 has been assigned (recycled)
[2020/10/16 21:18:57] [ info] [output:http:http.1] 127.0.0.1:8080, HTTP status=200
{
  "args": {},
  "data": "data:application/octet-stream;base64,ktcAX4oOQCJ/I6yBp21lc3NhZ2WlZHVtbXk=",
  "files": {},
  "form": {},
  "headers": {
    "Content-Length": "26",
    "Content-Type": "application/msgpack",
    "Host": "127.0.0.1:8080",
    "User-Agent": "Fluent-Bit"
  },
  "json": null,
  "origin": "172.17.0.1",
  "url": "http://127.0.0.1:8080/post"
}

[2020/10/16 21:18:57] [debug] [upstream] KA connection #27 to 127.0.0.1:8080 is now available
[2020/10/16 21:18:57] [debug] [task] destroy task=0x81ba9c0 (task_id=0)
[2020/10/16 21:18:58] [debug] [task] created task=0x8222290 id=0 OK
[2020/10/16 21:18:58] [debug] [upstream] KA connection #26 to logging.googleapis.com:443 has been assigned (recycled)
[2020/10/16 21:18:58] [debug] [output:stackdriver:stackdriver.0] [logging.googleapis.com/monitored_resource] not found in the payload
[2020/10/16 21:18:58] [debug] [output:stackdriver:stackdriver.0] HTTP Status=200
[2020/10/16 21:18:58] [debug] [upstream] KA connection #26 to logging.googleapis.com:443 is now available
[2020/10/16 21:18:58] [debug] [upstream] KA connection #27 to 127.0.0.1:8080 has been assigned (recycled)
[2020/10/16 21:18:58] [ info] [output:http:http.1] 127.0.0.1:8080, HTTP status=200
{
  "args": {},
  "data": "data:application/octet-stream;base64,ktcAX4oOQSL79NKBp21lc3NhZ2WlZHVtbXk=",
  "files": {},
  "form": {},
  "headers": {
    "Content-Length": "26",
    "Content-Type": "application/msgpack",
    "Host": "127.0.0.1:8080",
    "User-Agent": "Fluent-Bit"
  },
  "json": null,
  "origin": "172.17.0.1",
  "url": "http://127.0.0.1:8080/post"
}

[2020/10/16 21:18:58] [debug] [upstream] KA connection #27 to 127.0.0.1:8080 is now available
[2020/10/16 21:18:58] [debug] [task] destroy task=0x8222290 (task_id=0)
[2020/10/16 21:18:59] [debug] [task] created task=0x8289b80 id=0 OK
[2020/10/16 21:18:59] [debug] [upstream] KA connection #26 to logging.googleapis.com:443 has been assigned (recycled)
[2020/10/16 21:18:59] [debug] [output:stackdriver:stackdriver.0] [logging.googleapis.com/monitored_resource] not found in the payload
[2020/10/16 21:18:59] [debug] [output:stackdriver:stackdriver.0] HTTP Status=200
[2020/10/16 21:18:59] [debug] [upstream] KA connection #26 to logging.googleapis.com:443 is now available
[2020/10/16 21:18:59] [debug] [upstream] KA connection #27 to 127.0.0.1:8080 has been assigned (recycled)
[2020/10/16 21:18:59] [ info] [output:http:http.1] 127.0.0.1:8080, HTTP status=200
{
  "args": {},
  "data": "data:application/octet-stream;base64,ktcAX4oOQiJmJUeBp21lc3NhZ2WlZHVtbXk=",
  "files": {},
  "form": {},
  "headers": {
    "Content-Length": "26",
    "Content-Type": "application/msgpack",
    "Host": "127.0.0.1:8080",
    "User-Agent": "Fluent-Bit"
  },
  "json": null,
  "origin": "172.17.0.1",
  "url": "http://127.0.0.1:8080/post"
}

[2020/10/16 21:18:59] [debug] [upstream] KA connection #27 to 127.0.0.1:8080 is now available
[2020/10/16 21:18:59] [debug] [task] destroy task=0x8289b80 (task_id=0)
[2020/10/16 21:19:00] [debug] [task] created task=0x82f1450 id=0 OK
[2020/10/16 21:19:00] [debug] [upstream] KA connection #26 to logging.googleapis.com:443 has been assigned (recycled)
[2020/10/16 21:19:00] [debug] [output:stackdriver:stackdriver.0] [logging.googleapis.com/monitored_resource] not found in the payload
[2020/10/16 21:19:00] [debug] [output:stackdriver:stackdriver.0] HTTP Status=200
[2020/10/16 21:19:00] [debug] [upstream] KA connection #26 to logging.googleapis.com:443 is now available
[2020/10/16 21:19:00] [debug] [upstream] KA connection #27 to 127.0.0.1:8080 has been assigned (recycled)
[2020/10/16 21:19:00] [ info] [output:http:http.1] 127.0.0.1:8080, HTTP status=200
{
  "args": {},
  "data": "data:application/octet-stream;base64,ktcAX4oOQyM3slCBp21lc3NhZ2WlZHVtbXk=",
  "files": {},
  "form": {},
  "headers": {
    "Content-Length": "26",
    "Content-Type": "application/msgpack",
    "Host": "127.0.0.1:8080",
    "User-Agent": "Fluent-Bit"
  },
  "json": null,
  "origin": "172.17.0.1",
  "url": "http://127.0.0.1:8080/post"
}

[2020/10/16 21:19:00] [debug] [upstream] KA connection #27 to 127.0.0.1:8080 is now available
[2020/10/16 21:19:00] [debug] [task] destroy task=0x82f1450 (task_id=0)
[2020/10/16 21:19:01] [debug] [task] created task=0x8358d20 id=0 OK
[2020/10/16 21:19:01] [debug] [upstream] KA connection #26 to logging.googleapis.com:443 has been assigned (recycled)
[2020/10/16 21:19:01] [debug] [output:stackdriver:stackdriver.0] [logging.googleapis.com/monitored_resource] not found in the payload
[2020/10/16 21:19:01] [debug] [output:stackdriver:stackdriver.0] HTTP Status=200
[2020/10/16 21:19:01] [debug] [upstream] KA connection #26 to logging.googleapis.com:443 is now available
[2020/10/16 21:19:01] [debug] [upstream] KA connection #27 to 127.0.0.1:8080 has been assigned (recycled)
[2020/10/16 21:19:01] [ info] [output:http:http.1] 127.0.0.1:8080, HTTP status=200
{
  "args": {},
  "data": "data:application/octet-stream;base64,ktcAX4oORCabIWyBp21lc3NhZ2WlZHVtbXk=",
  "files": {},
  "form": {},
  "headers": {
    "Content-Length": "26",
    "Content-Type": "application/msgpack",
    "Host": "127.0.0.1:8080",
    "User-Agent": "Fluent-Bit"
  },
  "json": null,
  "origin": "172.17.0.1",
  "url": "http://127.0.0.1:8080/post"
}

[2020/10/16 21:19:01] [debug] [upstream] KA connection #27 to 127.0.0.1:8080 is now available
[2020/10/16 21:19:01] [debug] [task] destroy task=0x8358d20 (task_id=0)
^C[2020/10/16 21:19:02] [engine] caught signal (SIGINT)
[2020/10/16 21:19:02] [debug] [task] created task=0x83c0640 id=0 OK
[2020/10/16 21:19:02] [debug] [upstream] KA connection #26 to logging.googleapis.com:443 has been assigned (recycled)
[2020/10/16 21:19:02] [debug] [output:stackdriver:stackdriver.0] [logging.googleapis.com/monitored_resource] not found in the payload
[2020/10/16 21:19:02] [debug] [output:stackdriver:stackdriver.0] HTTP Status=200
[2020/10/16 21:19:02] [debug] [upstream] KA connection #26 to logging.googleapis.com:443 is now available
[2020/10/16 21:19:02] [debug] [upstream] KA connection #27 to 127.0.0.1:8080 has been assigned (recycled)
[2020/10/16 21:19:02] [ info] [output:http:http.1] 127.0.0.1:8080, HTTP status=200
{
  "args": {},
  "data": "data:application/octet-stream;base64,ktcAX4oORSNxr96Bp21lc3NhZ2WlZHVtbXk=",
  "files": {},
  "form": {},
  "headers": {
    "Content-Length": "26",
    "Content-Type": "application/msgpack",
    "Host": "127.0.0.1:8080",
    "User-Agent": "Fluent-Bit"
  },
  "json": null,
  "origin": "172.17.0.1",
  "url": "http://127.0.0.1:8080/post"
}

[2020/10/16 21:19:02] [debug] [upstream] KA connection #27 to 127.0.0.1:8080 is now available
[2020/10/16 21:19:02] [ warn] [engine] service will stop in 5 seconds
[2020/10/16 21:19:02] [debug] [task] destroy task=0x83c0640 (task_id=0)
[2020/10/16 21:19:02] [debug] [input chunk] dummy.0 is paused, cannot append records
^C[2020/10/16 21:19:02] [engine] caught signal (SIGINT)
==10572==
==10572== HEAP SUMMARY:
==10572==     in use at exit: 2,262,537 bytes in 8,499 blocks
==10572==   total heap usage: 83,894 allocs, 75,395 frees, 13,084,635 bytes allocated
==10572==
==10572== LEAK SUMMARY:
==10572==    definitely lost: 0 bytes in 0 blocks
==10572==    indirectly lost: 0 bytes in 0 blocks
==10572==      possibly lost: 2,215,143 bytes in 8,451 blocks
==10572==    still reachable: 47,394 bytes in 48 blocks
==10572==         suppressed: 0 bytes in 0 blocks
==10572== Rerun with --leak-check=full to see details of leaked memory
==10572==
==10572== For counts of detected and suppressed errors, rerun with: -v
==10572== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

# yiyu @ yiyu-fluent-bit-dev in ~/src/fluent-bit/build on git:feature/metrics-name o [21:19:02]
$

# yiyu @ yiyu-fluent-bit-dev in ~/src/fluent-bit/build on git:feature/metrics-name o [21:19:02] C:130
$ e fluent-bit.config

# yiyu @ yiyu-fluent-bit-dev in ~/src/fluent-bit/build on git:feature/metrics-name o [21:22:55]
$ valgrind ./bin/fluent-bit -c fluent-bit.config
==10792== Memcheck, a memory error detector
==10792== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==10792== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==10792== Command: ./bin/fluent-bit -c fluent-bit.config
==10792==
Fluent Bit v1.7.0
* Copyright (C) 2019-2020 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

[2020/10/16 21:22:58] [ info] Configuration:
[2020/10/16 21:22:58] [ info]  flush time     | 1.000000 seconds
[2020/10/16 21:22:58] [ info]  grace          | 5 seconds
[2020/10/16 21:22:58] [ info]  daemon         | 0
[2020/10/16 21:22:58] [ info] ___________
[2020/10/16 21:22:58] [ info]  inputs:
[2020/10/16 21:22:58] [ info]      dummy
[2020/10/16 21:22:58] [ info] ___________
[2020/10/16 21:22:58] [ info]  filters:
[2020/10/16 21:22:58] [ info] ___________
[2020/10/16 21:22:58] [ info]  outputs:
[2020/10/16 21:22:58] [ info]      http.0
[2020/10/16 21:22:58] [ info] ___________
[2020/10/16 21:22:58] [ info]  collectors:
[2020/10/16 21:22:58] [ info] [engine] started (pid=10792)
[2020/10/16 21:22:58] [debug] [engine] coroutine stack size: 24576 bytes (24.0K)
[2020/10/16 21:22:58] [debug] [storage] [cio stream] new stream registered: dummy.0
[2020/10/16 21:22:58] [ info] [storage] version=1.0.6, initializing...
[2020/10/16 21:22:58] [ info] [storage] in-memory
[2020/10/16 21:22:58] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
[2020/10/16 21:22:58] [debug] [router] match rule dummy.0:http.0
[2020/10/16 21:22:58] [ info] [sp] stream processor started
==10792== Warning: client switching stacks?  SP change: 0x6805948 --> 0x5c75130
==10792==          to suppress, use: --max-stackframe=12126232 or greater
==10792== Warning: client switching stacks?  SP change: 0x5c750a8 --> 0x6805948
==10792==          to suppress, use: --max-stackframe=12126368 or greater
==10792== Warning: client switching stacks?  SP change: 0x6805948 --> 0x5c750a8
==10792==          to suppress, use: --max-stackframe=12126368 or greater
==10792==          further instances of this message will not be shown.
[2020/10/16 21:23:00] [debug] [task] created task=0x5c6ed00 id=0 OK
[2020/10/16 21:23:00] [ info] [output:http:http.0] 127.0.0.1:8080, HTTP status=200
{
  "args": {},
  "data": "data:application/octet-stream;base64,ktcAX4oPMx5TXemBp21lc3NhZ2WlZHVtbXk=",
  "files": {},
  "form": {},
  "headers": {
    "Content-Length": "26",
    "Content-Type": "application/msgpack",
    "Host": "127.0.0.1:8080",
    "User-Agent": "Fluent-Bit"
  },
  "json": null,
  "origin": "172.17.0.1",
  "url": "http://127.0.0.1:8080/post"
}

[2020/10/16 21:23:00] [debug] [upstream] KA connection #25 to 127.0.0.1:8080 is now available
[2020/10/16 21:23:00] [debug] [task] destroy task=0x5c6ed00 (task_id=0)
[2020/10/16 21:23:01] [debug] [task] created task=0x5cc1850 id=0 OK
[2020/10/16 21:23:01] [debug] [upstream] KA connection #25 to 127.0.0.1:8080 has been assigned (recycled)
[2020/10/16 21:23:01] [ info] [output:http:http.0] 127.0.0.1:8080, HTTP status=200
{
  "args": {},
  "data": "data:application/octet-stream;base64,ktcAX4oPNCDrMrGBp21lc3NhZ2WlZHVtbXk=",
  "files": {},
  "form": {},
  "headers": {
    "Content-Length": "26",
    "Content-Type": "application/msgpack",
    "Host": "127.0.0.1:8080",
    "User-Agent": "Fluent-Bit"
  },
  "json": null,
  "origin": "172.17.0.1",
  "url": "http://127.0.0.1:8080/post"
}

[2020/10/16 21:23:01] [debug] [upstream] KA connection #25 to 127.0.0.1:8080 is now available
[2020/10/16 21:23:01] [debug] [task] destroy task=0x5cc1850 (task_id=0)
^C[2020/10/16 21:23:02] [engine] caught signal (SIGINT)
[2020/10/16 21:23:02] [debug] [task] created task=0x5d14200 id=0 OK
[2020/10/16 21:23:02] [debug] [upstream] KA connection #25 to 127.0.0.1:8080 has been assigned (recycled)
[2020/10/16 21:23:02] [ info] [output:http:http.0] 127.0.0.1:8080, HTTP status=200
{
  "args": {},
  "data": "data:application/octet-stream;base64,ktcAX4oPNR3gKH+Bp21lc3NhZ2WlZHVtbXk=",
  "files": {},
  "form": {},
  "headers": {
    "Content-Length": "26",
    "Content-Type": "application/msgpack",
    "Host": "127.0.0.1:8080",
    "User-Agent": "Fluent-Bit"
  },
  "json": null,
  "origin": "172.17.0.1",
  "url": "http://127.0.0.1:8080/post"
}

[2020/10/16 21:23:02] [debug] [upstream] KA connection #25 to 127.0.0.1:8080 is now available
[2020/10/16 21:23:02] [ warn] [engine] service will stop in 5 seconds
[2020/10/16 21:23:02] [debug] [task] destroy task=0x5d14200 (task_id=0)
[2020/10/16 21:23:02] [debug] [input chunk] dummy.0 is paused, cannot append records
^C[2020/10/16 21:23:03] [engine] caught signal (SIGINT)
==10792==
==10792== HEAP SUMMARY:
==10792==     in use at exit: 61,947 bytes in 189 blocks
==10792==   total heap usage: 397 allocs, 208 frees, 1,154,660 bytes allocated
==10792==
==10792== LEAK SUMMARY:
==10792==    definitely lost: 0 bytes in 0 blocks
==10792==    indirectly lost: 0 bytes in 0 blocks
==10792==      possibly lost: 14,553 bytes in 141 blocks
==10792==    still reachable: 47,394 bytes in 48 blocks
==10792==         suppressed: 0 bytes in 0 blocks
==10792== Rerun with --leak-check=full to see details of leaked memory
==10792==
==10792== For counts of detected and suppressed errors, rerun with: -v
==10792== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

src/flb_sds.c Outdated Show resolved Hide resolved
@edsiper edsiper self-assigned this Oct 22, 2020
@edsiper edsiper added the waiting-for-user Waiting for more information, tests or requested changes label Oct 22, 2020
@erain erain force-pushed the feature/metrics-name branch 3 times, most recently from d1c2a97 to 3cfa1b0 Compare October 23, 2020 20:22
@erain
Copy link
Contributor Author

erain commented Oct 23, 2020

Also added a unit test for flb_sds_cat_auto. This PR is ready for review.

@erain
Copy link
Contributor Author

erain commented Nov 18, 2020

@edsiper would you mind take another round of review? (I've addressed all the comments)

@erain
Copy link
Contributor Author

erain commented Dec 4, 2020

Friendly ping~

@erain erain requested a review from edsiper January 25, 2021 21:16
src/flb_sds.c Outdated
@@ -389,6 +397,6 @@ void flb_sds_destroy(flb_sds_t s)
return;
}

head = FLB_SDS_HEADER(s);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls restore the original indentantion level

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored the original indentation level. (And did a force push because don't want to have one extra commit)

- auso implemented flb_sds_cat_auto so that we don't need to manually
counting the length of the string.

Signed-off-by: Yu Yi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-user Waiting for more information, tests or requested changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants