URI Statistics
Last updated
Was this helpful?
Last updated
Was this helpful?
URI statistics menu is newly added to Pinpoint in v2.5.0. Pinpoint Agent aggregates URI templates and send them to Pinpoint collector via GRPC. Pinpoint Collector saves the data to Pinot via Apache Kafka. Pinpoint Web accesses Pinot to display the data.
Kafka enables real-time streaming of URI statistics data from Pinpoint collector to Pinot. If you have already set up Kafka for Pinpoint System Metric, please skip this step.
Please refer to this document to get Kafka and start the Kafka environment.
Create a topic with the name uri-stat
This section describes how to install Pinot which is used in Pinpoint to save URI statistics data. If you have already set up Pinot for Pinpoint System Metric, please skip this step.
Install Pinot according to Pinot Getting Started guide.
Above guide gives you the way to run Pinot locally, in Docker, and in Kubernetes.
Pinot table schema for Pinpoint URI statistics is provided in our github repository.
Please refer to Pinot documents to create necessary tables in your Pinot cluster.
Table uriStat
should be created. Use pinot-uriStat-schema.json
and pinot-uriStat-table.json
to create the table.
This section describes the URI stat configuration values added for URI statistics.
1.5.1 Configuration values for URI Statistics
Below are default agent configuration values for URI statistics.
profiler.uri.stat.enable: whether Pinpoint Agent collects URI statistics or not.
true
: collects URI statistics
false
: doesn't collect URI statistics
profiler.uri.stat.spring.webmvc.enable: whether Pinpoint Agent collects URI statistics from Spring Web MVC applications.
true
: collects URI statistics from Spring Web MVC applications.
false
: doesn't collect URI statistics from Spring Web MVC applications.
profiler.uri.stat.spring.webmvc.useuserinput: whether Pinpoint Agent uses user-input request attribute values for URI templates when available.
true
: uses user-input request attribute values.
false
: ignores user-input request attribute values.
Set attribute pinpoint.metric.uri-template
to your Spring web request as shown below to override default URI template provided by Pinpoint.
profiler.uri.stat.spring.webflux.enable: whether Pinpoint Agent collects URI statistics from Spring Webflux applications.
true
: collects URI statistics from Spring Webflux applications.
false
: doesn't collect URI statistics from Spring Webflux applications.
profiler.uri.stat.spring.webflux.useuserinput: whether Pinpoint Agent uses user-input request attribute values for URI templates when available.
true
: uses user-input request attribute values.
false
: ignores user-input request attribute values.
Set attribute pinpoint.metric.uri-template
to your Spring web request as shown below to override default URI template provided by Pinpoint.
profiler.uri.stat.vertx.enable: whether Pinpoint Agent collects URI statistics from Vert.x applications.
true
: collects URI statistics from Vert.x applications.
false
: doesn't collect URI statistics from Vert.x applications.
profiler.uri.stat.vertx.useuserinput: whether Pinpoint Agent uses user-input routing context attribute values for URI templates when available.
true
: uses user-input routing context attribute values.
false
: ignores user-input routing context attribute values.
Set attribute pinpoint.metric.uri-template
to your Vert.x routing context as shown below to override default URI template provided by Pinpoint.
To change the configuration values described above, update pinpoint.config
under each profile directory and rebuild the project. Or, you can simply pass these properties when starting your application with Pinpoint Agent (e.g. -Dprofiler.uri.stat.enable=false
).
Instead of the default Pinpoint Collector and Web binaries, you should use those compiled under metric-module.
Please check here for Pinpoint Metric Collector properties.
Enable URI statistics by adding the below line at pinpoint-collector.properties:
pinpoint.collector.type=METRIC
argument should be used to collect URI statistics in collector.
Please check here for Pinpoint Metric Web properties.
Enable URI statistics by adding the below line at pinpoint-web-metric.properties:
Click URL Statistic
on the side bar menu in Pinpoint web.
Search for the application name you used to configure Pinpoint Agent.
Top 50 URIs used in your application will be displayed below the empty chart.
Click each URI to load the chart.
URI ν΅κ³ κΈ°λ₯μ νν¬μΈνΈ v2.5.0μ μ κ·λ‘ μΆκ°λμλ€. νν¬μΈνΈ μμ΄μ νΈμμ URI ν νλ¦Ώ μ 보λ₯Ό μμ§νμ¬ GRPCλ₯Ό μ¬μ©ν΄ νν¬μΈνΈ μ½λ ν°μ μ λ¬νκ³ , νν¬μΈνΈ μ½λ ν°λ μνμΉ μΉ΄νμΉ΄λ₯Ό ν΅ν΄ μνμΉ νΌλ Έμ κ°μ μ μ₯νλ€. νν¬μΈνΈ μΉμμ μ μ₯λ URI ν΅κ³ λ°μ΄ν°λ₯Ό νμΈν μ μλ€.
μ€μκ°μΌλ‘ νν¬μΈνΈ μ½λ ν°μμ λ°μ΄ν°λ₯Ό μ λ¬λ°μ νΌλ Έμ μ μ₯νκΈ° μν΄μ μΉ΄νμΉ΄λ₯Ό μ€μΉν΄μΌ νλ€. μ΄λ―Έ μμ€ν λ©νΈλ¦ μ€μ μ νλ©΄μ μΉ΄νμΉ΄λ₯Ό μ€μΉνμλ€λ©΄, μ΄ λΆλΆμ 건λλ°μμμ€.
μ€μΉ λ°©λ² κ°μ΄λλ₯Ό μ°Έκ³ νμ¬ kafkaλ₯Ό μ€μΉνλ€.
μλμ κ°μ΄ uri-stat
ν ν½μ μμ±νλ€.
URI ν΅κ³ κ°μ μ μ₯νλ νΌλ Έλ₯Ό μ€μΉνλ λ²μ μλ΄νλ€. μ΄λ―Έ μμ€ν λ©νΈλ¦ μ€μ μ νλ©΄μ νΌλ Έλ₯Ό μ€μΉνμλ€λ©΄, μ΄ λΆλΆμ 건λλ°μμμ€.
νΌλ Έ μ€μΉ κ°μ΄λλ₯Ό μ°Έκ³ νμ¬ νΌλ Έλ₯Ό μ€μΉνλ€.
λ€μν νκ²½ (local, docker, kubernetes)μμ νΌλ Έ μ€ν νκ²½μ ꡬμ±ν μ μμΌλ μ κ°μ΄λλ₯Ό μ°Έκ³ νμ.
νν¬μΈνΈ κΉν μ μ₯μμ URI ν΅κ³λ₯Ό μν νΌλ Έ ν μ΄λΈ μ€ν€λ§μ ν μ΄λΈ μ λ³΄κ° μλ€.
μ κ²½λ‘μμ pinot-uriStat-schema.json
μ pinot-uriStat-table.json
λ₯Ό μ°Έκ³ νμ¬ uriStat
ν
μ΄λΈμ μμ±νλ€.
νΌλ Έμ νμν ν μ΄λΈμ ꡬμ±νλ λ°©λ²μ νΌλ Έ 곡μ λ¬Έμλ₯Ό μ°Έκ³ νμ.
URI ν΅κ³ μμ§μ μν΄ νν¬μΈνΈ μμ΄μ νΈμ μ€μ ν΄μΌ νλ κ°λ€μ μλ΄νλ€.
1.5.1 URI ν΅κ³ μμ§μ μν μ€μ κ°
URI ν΅κ³ μμ§κ³Ό κ΄λ ¨λ νν¬μΈνΈ μμ΄μ νΈμ μ€μ κΈ°λ³Έκ°λ€μ μλμ κ°λ€.
profiler.uri.stat.enable: νν¬μΈνΈ μμ΄μ νΈκ° URI ν΅κ³λ₯Ό μμ§νλμ§ μ¬λΆ.
true
: URI ν΅κ³λ₯Ό μμ§νλ€.
false
: URI ν΅κ³λ₯Ό μμ§νμ§ μλλ€.
profiler.uri.stat.spring.webmvc.enable: νν¬μΈνΈ μμ΄μ νΈκ° μ€νλ§ μΉ MVC μ΄ν리μΌμ΄μ μμ URI ν΅κ³λ₯Ό μμ§νλμ§ μ¬λΆ.
true
: μ€νλ§ μΉ MVC μ΄ν리μΌμ΄μ
μμ URI ν΅κ³λ₯Ό μμ§νλ€.
false
: μ€νλ§ μΉ MVC μ΄ν리μΌμ΄μ
μμ URI ν΅κ³λ₯Ό μμ§νμ§ μλλ€.
profiler.uri.stat.spring.webmvc.useuserinput: νν¬μΈνΈ μμ΄μ νΈκ° μ€νλ§ μΉ μ΄ν리μΌμ΄μ μμ μ¬μ©μ μ μ URI ν νλ¦Ώμ μ°μ μ μΌλ‘ μ¬μ©νλμ§ μ¬λΆ.
true
: μ€νλ§ μΉ μ΄ν리μΌμ΄μ
μμ μ¬μ©μ μ μ URI ν
νλ¦Ώμ μ°μ μ μΌλ‘ μ¬μ©νλ€.
false
: μ€νλ§ μΉ μ΄ν리μΌμ΄μ
μμ μ¬μ©μ μ μ URI ν
νλ¦Ώμ νμΈνμ§ μκ³ νν¬μΈνΈκ° μμ§ν ν
νλ¦Ώλ§ μ¬μ©νλ€.
νν¬μΈνΈμμ μμ§νλ URI ν
νλ¦Ώμ μ¬μ©νμ§ μκ³ μ¬μ©μ μ μ URI ν
νλ¦Ώμ μ¬μ©νκ³ μΆλ€λ©΄, μλ μμ μ κ°μ΄ μ€νλ§ μΉ λ¦¬νμ€νΈ κ°μ²΄ attributeμ pinpoint.metric.uri-template
λ₯Ό key κ°μΌλ‘ νλ μμ± κ°μ μ€μ ν΄μΌ νλ€.
profiler.uri.stat.spring.webflux.enable: νν¬μΈνΈ μμ΄μ νΈκ° μ€νλ§ μΉνλμ€ μ΄ν리μΌμ΄μ μμ URI ν΅κ³λ₯Ό μμ§νλμ§ μ¬λΆ.
true
: μ€νλ§ μΉνλμ€ μ΄ν리μΌμ΄μ
μμ URI ν΅κ³λ₯Ό μμ§νλ€.
false
: μ€νλ§ μΉνλμ€ μ΄ν리μΌμ΄μ
μμ URI ν΅κ³λ₯Ό μμ§νμ§ μλλ€.
profiler.uri.stat.spring.webflux.useuserinput: νν¬μΈνΈ μμ΄μ νΈκ° μ€νλ§ μΉνλμ€ μ΄ν리μΌμ΄μ μμ μ¬μ©μ μ μ URI ν νλ¦Ώμ μ°μ μ μΌλ‘ μ¬μ©νλμ§ μ¬λΆ.
true
: μ€νλ§ μΉνλμ€ μ΄ν리μΌμ΄μ
μμ μ¬μ©μ μ μ URI ν
νλ¦Ώμ μ°μ μ μΌλ‘ μ¬μ©νλ€.
false
: μ€νλ§ μΉνλμ€ μ΄ν리μΌμ΄μ
μμ μ¬μ©μ μ μ URI ν
νλ¦Ώμ νμΈνμ§ μκ³ νν¬μΈνΈκ° μμ§ν ν
νλ¦Ώλ§ μ¬μ©νλ€.
νν¬μΈνΈμμ μμ§νλ URI ν
νλ¦Ώμ μ¬μ©νμ§ μκ³ μ¬μ©μ μ μ URI ν
νλ¦Ώμ μ¬μ©νκ³ μΆλ€λ©΄, μλ μμ μ κ°μ΄ μ€νλ§ μΉ λ¦¬νμ€νΈ κ°μ²΄ attributeμ pinpoint.metric.uri-template
λ₯Ό key κ°μΌλ‘ νλ μμ± κ°μ μ€μ ν΄μΌ νλ€.
profiler.uri.stat.vertx.enable: νν¬μΈνΈ μμ΄μ νΈκ° Vert.x μ΄ν리μΌμ΄μ μμ URI ν΅κ³λ₯Ό μμ§νλμ§ μ¬λΆ.
true
: Vert.x μ΄ν리μΌμ΄μ
μμ URI ν΅κ³λ₯Ό μμ§νλ€..
false
: Vert.x μ΄ν리μΌμ΄μ
μμ URI ν΅κ³λ₯Ό μμ§νμ§ μλλ€.
profiler.uri.stat.vertx.useuserinput: νν¬μΈνΈ μμ΄μ νΈκ° Vert.x μ΄ν리μΌμ΄μ μμ μ¬μ©μ μ μ URI ν νλ¦Ώμ μ°μ μ μΌλ‘ μ¬μ©νλμ§ μ¬λΆ.
true
: Vert.x μ΄ν리μΌμ΄μ
μμ μ¬μ©μ μ μ URI ν
νλ¦Ώμ μ°μ μ μΌλ‘ μ¬μ©νλ€.
false
: Vert.x μ΄ν리μΌμ΄μ
μμ μ¬μ©μ μ μ URI ν
νλ¦Ώμ νμΈνμ§ μκ³ νν¬μΈνΈκ° μμ§ν ν
νλ¦Ώλ§ μ¬μ©νλ€.
νν¬μΈνΈμμ μμ§νλ URI ν
νλ¦Ώμ μ¬μ©νμ§ μκ³ μ¬μ©μ μ μ URI ν
νλ¦Ώμ μ¬μ©νκ³ μΆλ€λ©΄, μλ μμ μ κ°μ΄ Vert.x RoutingContext κ°μ²΄μ pinpoint.metric.uri-template
λ₯Ό key κ°μΌλ‘ νλ μμ± κ°μ μ€μ ν΄μΌ νλ€.
μ μ€μ κ°λ€μ λ³κ²½νλ €λ©΄ μνλ νν¬μΈνΈ νλ‘νμΌ κ²½λ‘μ pinpoint.config
νμΌμμ κ°μ λ³κ²½νμ¬ νν¬μΈνΈλ₯Ό μ¬λΉλνλ€. νμΌμ μμ νμ§ μκ³ , νν¬μΈνΈ μμ΄μ νΈλ₯Ό λΆν μ΄ν리μΌμ΄μ
μ μ€νν λ -Dprofiler.uri.stat.enable=false
μ κ°μ΄ κ°μ λ£μ΄λ λλ€.
URI ν΅κ³λ₯Ό μμ§νκ³ κ°μ νμΈνλ €λ©΄, νν¬μΈνΈ v2.5.0 μ΄μ λ²μ μμ μ¬μ©νλ μ½λ ν°μ μΉ JAR νμΌμ΄ μλλΌ metric-module λ°μ μμ±λλ νμΌμ μ¬μ©ν΄μΌ νλ€.
νν¬μΈνΈ λ©νΈλ¦ μ½λ ν°λ₯Ό μ€λͺ ν λ¬Έμμ μμΈν μ€λͺ μ΄ μμΌλ μ°Έκ³ ν΄μ λ©νΈλ¦ μ½λ ν° μ€μ κ°μ μΈν νμ.
μ μ€μ μΈμ URI ν΅κ³λ₯Ό μν΄ pinpoint.collector.propertiesμ μλ μ€μ κ°μ΄ μΆκ°λμλ€:
URI ν΅κ³λ₯Ό μμ§νκΈ° μν΄μλ μ½λ ν°λ₯Ό μμν λ pinpoint.collector.type=METRIC
argumentλ₯Ό λ£μ΄μΌ νλ€.
νν¬μΈνΈ λ©νΈλ¦ μΉμ μ€λͺ ν λ¬Έμμ μμΈν μ€λͺ μ΄ μμΌλ μ°Έκ³ ν΄μ λ©νΈλ¦ μΉ μ€μ κ°μ μΈν νμ.
μ μ€μ μΈμ URI ν΅κ³λ₯Ό μν΄ pinpoint-web-metric.propertiesμ μλ μ€μ κ°μ΄ μΆκ°λμλ€:
νν¬μΈνΈ λ©νΈλ¦ μΉμ μ€ννμ¬ μΌμͺ½ URL Statistic
λ©λ΄λ₯Ό μ ννλ€.
μλ¨μ seslect boxμμ νν¬μΈνΈ μμ΄μ νΈμ μ€μ ν μ΄ν리μΌμ΄μ μ΄λ¦μ μ‘°ννλ€..
μ΄κΈ° νλ©΄μμλ μ νν μ΄ν리μΌμ΄μ μμ κ°μ₯ λ§μ΄ μ¬μ©ν μμ 50κ° URIκ° λΉ μ°¨νΈ λ°μ νμλλ€.
μνλ URIλ₯Ό ν΄λ¦νλ©΄ μ°¨νΈμ λ°μ΄ν°κ° νμλλ€.