New Inspector

English | ํ•œ๊ตญ์–ด

1 Overview

There has been changes in inspector in v3.0.0. The newly renewed inspector will be referred to as 'New Inspector' below, while the previous version will be referred to as 'Legacy Inspector' (Legacy Application Inspector).

Although users won't see significant changes on front-end, but the whole architecture has been rebuilt from the scratch. The data storage has been changed from HBase to Pinot. And the APIs have been improved so that it is more easily extenable and their responses more clear to understand.

2 Installation and Configuration

2.1 Install and Run Kafka

Kafka enables real-time streaming of inspector data from Pinpoint collector to Pinot.

2.1.A Set Up Kafka

Refer to this document to download Kafka and start the Kafka environment.

If you have already set up Kafka for Pinpoint System Metric, please skip this step.

2.1.B Create Kafka Topics for New Inspector

  • Create 2 topics with the names below:

    • inspector-stat-agent-00

    • inspector-stat-app

2.2 Set Up Pinot

2.2.A Install Pinot

Install Pinot according to Pinot Getting Started guide.

If you have already set up Pinot for Pinpoint System Metric, please skip this step.

2.2.B Create Pinot Tables

  • Create 2 tables with the snames below:

    • inspectorStatAgent00: This table stores agent inspector data. The script file to create the table is provided in our github repository.

    • inspectorStatApp: This table stores application inspector data.

  • Refer to the github repository for table schema and configuration settings.

2.3 Configure and Run Pinpoint Collector, Web, and Batch with New Inspector

  • Related options and settings are already enabled by default, so there is no need to modify any settings from what is provided in our github repository.

  • When upgrading from Pinpoint version below 3.0 to version 3.0.0 or above, some of the options may be missing in the configuration properties files you have been using. Please refer to the related configurations in the following section to check if any changes are needed in your settings.

  • The following configurations are already set by default in Pinpoint version 3.0.

  • When upgrading from Pinpoint version below 3.0 to version 3.0.0 or above and when you wish to continue using customized configuration files you have been using, please check if below mentioned configurations are well set in your files.

Pinpoint Collector

  • application.yml file in collector-starter module:

pinpoint:
  modules:
    collector:
      inspector:
        enabled: true

Pinpoint Web

  • application.yml file in web-starter module:

pinpoint:
  modules:
    web:
      inspector:
        enabled: true

Pinpoint Batch

  • batch-root.properties file in batch module:

alarm.collector.version=2

4 Q&A

A Can we still use the Legacy Inspector to save the data to HBase?

Yes, but Legacy Inspector will be deprecated in v3.0.1 so we recommended you to use the New Inspector.

To use Legacy Inspector with v3.0.0, you need to add the following settings to the Pinpoint components:

Modify application.yml file in collector-starter module OR add java vm option when running Pinpoint Collector.

  • application.yml

pinpoint:
  modules:
    collector:
      inspector:
        hbase:
          enabled: true
  • java vm option

-Dpinpoint.modules.collector.inspector.hbase.enabled=true

Modify batch-root.properties file in batch module OR add java vm option when running Pinpoint Batch.

  • batch-root.properties

alarm.collector.version=1
  • java vm option

-Dalarm.collector.version=1

B Why change database to Pinot when there are no additional features provided to users?

New Inspector saves and retrieves the data faster than the Legacy Inspector thanks to Pinot. As Pinot project gets mature over time, there can be further improvements on performance or additional features can be introduced to Pinpoint Inpsector as well.

C Reading inspector-stat-agent table becomes slow as more data is being stored.

You can improve performance by distributing the data across multiple tables. Follow the steps below to create multiple Kafka topics and Pinot tables. Then, add settings to Pinpoint components to read and write data from multiple Pinot tables.

Create More Kafka Topics

  • Create N Kafka topics. (From 00 to N-1)

  • The format of the topics is as follows:

    • inspector-stat-agent-00

    • inspector-stat-agent-01

    • ...

    • inspector-stat-agent-99

Create More Pinot Tables

  • Create N Pinot tables. (From 00 to N-1)

    • The script file creating multiple Pinot tables is provided in our github repository.

  • The format of the table names and schema names is as follows:

    • inspectorStatAgent00

    • inspectorStatAgent01

    • ...

    • inspectorStatAgent99

Modify application.yml file in collector-starter module OR add java vm option when running Pinpoint Collector

  • application.yml

kafka:
  inspector:
    agent:
      table:
        count: N
  • java vm option

-Dkafka.inspector.agent.topic.count=N

Modify application.yml file in web-starter module OR add java vm option when running Pinpoint Web

  • application.yml

pinot:
  inspector:
    agent:
      table:
        count: N
  • java vm option

-Dpinot.inspector.agent.topic.count=N

Modify batch-root.properties file in batch module OR add java vm option when running Pinpoint Batch

  • batch-root.properties

job.alarm.agent.inspector.stat.table.count=N
  • java vm option

-Djob.alarm.agent.inspector.stat.table.count=N

1 ๊ฐœ์š”

inspector๊ฐ€ Pinpoint v3.0.0์—์„œ ์ƒˆ๋กœ์›Œ์กŒ์Šต๋‹ˆ๋‹ค. ์ดํ•˜ ์ƒˆ๋กœ์›Œ์ง„ inspector๋ฅผ 'New Inspector'์ด๋ผ๊ณ  ๋ถ€๋ฅด๊ณ  ๊ณผ๊ฑฐ์˜ inspector๋Š” 'Legacy Inspector'๋ผ๊ณ  ์นญํ•ฉ๋‹ˆ๋‹ค (Legacy Application Inspector).

New Inspector์—์„œ ์‚ฌ์šฉ์ž๊ฐ€ ๋ณด๋Š” ํ™”๋ฉด์€ ํฌ๊ฒŒ ๋‹ฌ๋ผ์ง„ ๊ฑด์€ ์—†์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๋‚ด๋ถ€์ ์œผ๋กœ ๋งŽ์€ ๋ณ€ํ™”๊ฐ€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜๋Š” ์ €์žฅ์†Œ๊ฐ€ HBase์—์„œ Pinot๋กœ ๋ณ€๊ฒฝ์ด ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. api๋ฅผ ์‰ฝ๊ฒŒ ํ™•์žฅํ•  ์ˆ˜ ์žˆ๊ณ , response๋ฅผ ๋ช…ํ™•ํ•œ ํ˜•์‹์œผ๋กœ ๊ฐœํŽธํ–ˆ์Šต๋‹ˆ๋‹ค. ์ฆ‰ inspector ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•˜๊ณ  ํ™•์žฅํ•˜๊ธฐ ์‰ฝ๊ฒŒ ๊ฐœ์„ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

2 ์„ค์น˜/์„ค์ • ๋ฐฉ๋ฒ•

2.1 Kafka ์„ค์น˜ ๋ฐ ์‹คํ–‰

์‹ค์‹œ๊ฐ„์œผ๋กœ collector์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ ์ „๋‹ฌ๋ฐ›์•„ Pinot์— ์ €์žฅํ•˜๊ธฐ ์œ„ํ•ด์„œ Kafka๋ฅผ ์„ค์น˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

2.1.A Kafka ์„ค์น˜

์„ค์น˜ ๊ฐ€์ด๋“œ ๋งํฌ๋ฅผ ๋ณด๊ณ  Kafka๋ฅผ ๋‹ค์šด ๋ฐ›์•„ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

2.1.B topic ์ƒ์„ฑ

  • ์•„๋ž˜ 2๊ฐœ Kafka topic์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

    • inspector-stat-agent-00

    • inspector-stat-app

2.2 Pinot ์„ค์น˜ ๋ฐ ์‹คํ–‰

2.1.A Pinot ์„ค์น˜

Pinot ์‚ฌ์ดํŠธ์—์„œ ์„ค์น˜ ๋ฐฉ๋ฒ• ๊ฐ€์ด๋“œ๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ Pinot๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.

2.1.B Pinot table ์ƒ์„ฑ

  • ์•„๋ž˜ 2๊ฐœ ํ…Œ์ด๋ธ”์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

    • inspectorStatAgent00: ์ด ํ…Œ์ด๋ธ”์€ agent inspector data๋ฅผ ์ €์žฅํ•ฉ๋‹ˆ๋‹ค. ์Šคํฌ๋ฆฝํŠธ๋กœ ์ƒ์„ฑ์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

    • inspectorStatApp: ์ด ํ…Œ์ด๋ธ”์€ application inspector data๋ฅผ ์ €์žฅํ•ฉ๋‹ˆ๋‹ค.

  • table schema์™€ configuration์€ github repository๋ฅผ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.

2.3 Pinpoint Collector, batch, Web์˜ New Inspector ๊ธฐ๋Šฅ ํ™œ์„ฑํ™”

  • ๊ด€๋ จ ์˜ต์…˜ ๋ฐ ์„ค์ •์€ ๊ธฐ๋ณธ์ ์œผ๋กœ ํ™œ์„ฑํ™”๋˜์–ด ์žˆ์œผ๋ฏ€๋กœ ์ถ”๊ฐ€๋กœ ์„ค์ •ํ•  ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.

  • Pinpoint 3.0 ๋ฏธ๋งŒ๋ฒ„์ „์—์„œ 3.0.0 ์ด์ƒ๋ฒ„์ „์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œ ์‹œ ์ผ๋ถ€ ์˜ต์…˜์ด ๋ˆ„๋ฝ๋˜๋Š”๊ฒฝ์šฐ ์•„๋ž˜ ๊ด€๋ จ ์˜ต์…˜ ์„ค๋ช…์„ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.

3 Pinpoint ์ปดํฌ๋„ŒํŠธ์˜ ๊ด€๋ จ ์„ค์ •

  • ์•„๋ž˜ ์„ค์ •๋“ค์€ Pinpoint 3.0 ๋ฒ„์ „์—์„œ ๊ธฐ๋ณธ์ ์œผ๋กœ ์„ค์ •๋˜์–ด์žˆ์Šต๋‹ˆ๋‹ค.

  • Pinpoint ๋ฒ„์ „์„ 3.0์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๋Š”๊ฒฝ์šฐ ์ผ๋ถ€ ์„ค์ •์ด ๋ˆ„๋ฝ๋˜๋Š” ๊ฒฝ์šฐ ์ฐธ๊ณ ํ•˜๊ธฐ ์œ„ํ•ด์„œ ์„ค์ •์„ ๋ช…์‹œํ•ด๋†“์Šต๋‹ˆ๋‹ค.

Pinpoint Collector

  • collector-starter ๋ชจ๋‘˜์˜ application.yml ํŒŒ์ผ:

pinpoint:
  modules:
    collector:
      inspector:
        enabled: true

Pinpoint Web

  • web-starter ๋ชจ๋“ˆ์˜ application.yml ํŒŒ์ผ:

pinpoint:
  modules:
    web:
      inspector:
        enabled: true

Pinpoint Batch

  • batch ๋ชจ๋“ˆ์˜ batch-root.properties ํŒŒ์ผ:

alarm.collector.version=2

4 Q&A

A HBase์— ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜๋Š” Legacy Inspector๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๋‚˜์š”?

๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ 3.0.1 ๋ฒ„์ „ ์ด์ƒ ๋ถ€ํ„ฐ๋Š” Legacy Inspector๋ฅผ ์‚ญ์ œํ•  ์˜ˆ์ •์ด๋ฏ€๋กœ Pinpoint ๋ฒ„์ „์ด ์˜ฌ๋ผ๊ฐˆ์ˆ˜๋ก ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ• ์ˆ˜ ์—†์œผ๋ฏ€๋กœ New Inspector๋ฅผ ์‚ฌ์šฉํ•˜๋Š”๊ฒƒ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•˜๋ ค๋ฉด Pinpoint ์ปดํฌ๋„ŒํŠธ๋“ค์— ์•„๋ž˜ ์„ค์ •์„ ์ถ”๊ฐ€ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.

collector-starter ํ”„๋กœ์ ํŠธ์˜ application.yml ํŒŒ์ผ์ด๋‚˜ java vm option์— ์•„๋ž˜ ์„ค์ •์„ ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”.

  • application.yml

pinpoint:
  modules:
    collector:
      inspector:
        hbase:
          enabled: true
  • java vm option

-Dpinpoint.modules.collector.inspector.hbase.enabled=true

batch ํ”„๋กœ์ ํŠธ์—์„œ batch-root.properties ํŒŒ์ผ์ด๋‚˜ java vm option์— ์•„๋ž˜ ์„ค์ •์„ ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”.

  • batch-root.properties

alarm.collector.version=1
  • java vm option

-Dalarm.collector.version=1

B ์‚ฌ์šฉ์ž์—๊ฒŒ ์ œ๊ณต๋˜๋Š” ๊ธฐ๋Šฅ์€ ๋น„์Šทํ•œ๋ฐ Pinot๊ธฐ๋ฐ˜์œผ๋กœ inspector๋ฅผ ๊ฐœ์„ ํ•œ ์ด์œ ๋Š” ๋ญ˜๊นŒ์š”?

๋‹ค์–‘ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ๋น ๋ฅด๊ฒŒ ์ €์žฅํ•˜๊ณ  ํ™•์ธํ•˜๊ณ  ์œ„ํ•ด์„œ Pinot๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•˜๋„๋ก ๊ฐœ์„ ๋˜์—ˆ๊ณ  ์•„์ง ๋ถ€์กฑํ•œ ๊ธฐ๋Šฅ์ด ๋งŽ์ง€๋งŒ Pinot์˜ ๋ฐœ์ „์— ๋งž์ถฐ์„œ ๊ธฐ๋Šฅ์„ ๋ณด์™„ํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

C inspector-stat-agent ํ…Œ์ด๋ธ”์˜ ๋ฐ์ดํ„ฐ๊ฐ€ ๋งŽ์•„์„œ ์ฝ๊ธฐ ์†๋„๊ฐ€ ๋А๋ ค์ง‘๋‹ˆ๋‹ค.

์—ฌ๋Ÿฌ ๊ฐœ์˜ ์ฒด์ด๋ธ”์— ๋ฐ์ดํ„ฐ๋ฅผ ๋‚˜๋ˆ„์–ด ์ €์žฅํ•ด์„œ ์„ฑ๋Šฅ ํ–ฅ์ƒ์„ ์–ป์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์•„๋ž˜๋ฅผ ๋‹จ๊ณ„๋ฅผ ๋”ฐ๋ผ ์ „์ฒด N ๊ฐœ์˜ Kafka topic๊ณผ Pinot table์„ ์ƒ์„ฑํ•˜๊ณ , Pinpoint ์ปดํฌ๋„ŒํŠธ๋“ค์— ์„ค์ •์„ ์ถ”๊ฐ€ํ•ด์„œ data๋ฅผ ์ˆ˜์ง‘/์กฐํšŒํ•ฉ๋‹ˆ๋‹ค.

Kafka topic ์ƒ์„ฑ

  • N๊ฐœ Kafka topic์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. (00์—์„œ N-1๊นŒ์ง€)

  • topic์˜ ํ˜•์‹์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

    • inspector-stat-agent-00

    • inspector-stat-agent-01

    • ...

    • inspector-stat-agent-99

Pinot table ์ƒ์„ฑ

  • N๊ฐœ Pinot table์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. (00์—์„œ N-1๊นŒ์ง€)

  • table name๊ณผ schema name์˜ ํ˜•์‹์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

    • insepctorStatAgent00

    • insepctorStatAgent01

    • ...

    • insepctorStatAgent99

collector-starter ๋ชจ๋“ˆ์˜ application.yml ํŒŒ์ผ์ด๋‚˜ java vm option์— ์•„๋ž˜ ์„ค์ •์„ ์ถ”๊ฐ€ํ•ด ์ฃผ์„ธ์š”.

  • application.yml

kafka:
  inspector:
    agent:
      table:
        count: N
  • java vm option

-Dkafka.inspector.agent.topic.count=N

web-starter ๋ชจ๋“ˆ์˜ application.yml ํŒŒ์ผ์ด๋‚˜ java vm option์— ์•„๋ž˜ ์„ค์ •์„ ์ถ”๊ฐ€ํ•ด ์ฃผ์„ธ์š”.

  • application.yml

pinot:
  inspector:
    agent:
      table:
        count: N
  • java vm option

-Dpinot.inspector.agent.topic.count=N

batch ๋ชจ๋“ˆ์˜ batch-root.properties ํŒŒ์ผ์ด๋‚˜ java vm option์— ์•„๋ž˜ ์„ค์ •์„ ์ถ”๊ฐ€ํ•ด ์ฃผ์„ธ์š”.

  • batch-root.properties

job.alarm.agent.inspector.stat.table.count=N
  • java vm option

-Djob.alarm.agent.inspector.stat.table.count=N

Last updated

Was this helpful?