• EnglishEspañol日本語한국어Português
  • 로그인지금 시작하기

사용자의 편의를 위해 제공되는 기계 번역입니다.

In the event of any inconsistency between the English version and the translated version, the English versionwill take priority. Please visit this page for more information.

문제 신고

스트라이프 통합

거래 개요, 거래량, 수익, 거래 오류 등의 지표를 추적하는 사전 구축된 단일 Stripe 대시보드에서 Stripe 애플리케이션을 모니터링하세요. 앱 데이터를 수집하기 위해 에이전트를 설치하기만 하면 모든 Stripe 앱 데이터를 한 곳에서 볼 수 있습니다.

하나의 대시보드에서 Stripe 앱의 모든 지표를 확인하세요.

스트라이프 모니터링 설정

인프라 에이전트 설치

CPU 사용량, 메모리 사용량, 스토리지 사용량, 네트워크 트래픽 등과 같은 호스트에 대한 세부 정보를 얻으려면 인프라 에이전트를 설치하세요.

에이전트를 설치하려면 안내된 설치를 따르거나 인프라 에이전트 설치 문서를 참조하여 수동으로 설치하세요.

APM 에이전트 설치

설치 안내 에서 APM(애플리케이션 성능 모니터링) 에이전트 중 하나를 설치하세요.

브라우저 모니터링 에이전트 설치

우리의 에이전트는 AJAX 성능, 오류율, 기간, 핵심 웹 바이탈, 처리량 등 애플리케이션 및 브라우저 관련 측정항목을 보고합니다.

합성 모니터링 설정

당사의 합성 모니터는 다양한 위치에서 앱을 테스트하고 서버 가동 중지 시간을 포착합니다. Stripe 대시보드에서 이 데이터를 볼 수 있습니다.

합성 모니터를 설정하려면 안내 설치단계를 따르세요.

측정항목을 New Relic으로 보내기

자세한 내용은 Metric API 설명서를 확인하세요.

계속 진행하려면 New Relic 라이센스 키가 필요합니다. 라이센스 키를 얻으려면 New Relic API 키를 참조하세요. 스트라이프 결제가 성공하면 스트라이프 API 서비스로부터 JSON을 받습니다. New Relic Metric API 요구 사항에 따라 JSON 형식을 지정하여 이러한 값을 New Relic으로 보내야 합니다.

다음 JavaScript 코드 조각은 데이터 형식을 지정하고 이를 New Relic 지표 API URL로 보냅니다.

const sendDataToNewRelic = (sessionJSON) => {
const currentDate = new Date();
const currentTime = currentDate.getTime();
const nrMetrics = [{
"metrics": [
{
"name": "stripe_metrics",
"timestamp": currentTime,
"value": 0,
"attributes": {
"stripe.session_id": sessionJSON.id,
"stripe.amount_total": sessionJSON.amount_total,
"stripe.customer_email": sessionJSON.customer_details.email,
"stripe.created_at": sessionJSON.created,
"stripe.currency" : sessionJSON.currency,
"stripe.payment_status": sessionJSON.payment_status,
"stripe.status": sessionJSON.status,
"stripe.discount_amount":sessionJSON.total_details.amount_discount,
"stripe.shipping_amount":sessionJSON.total_details.amount_shipping,
"stripe.tax_amount":sessionJSON.total_details.amount_tax
}
}
]
}]
const nrMetricAPI = 'https://metric-api.newrelic.com/metric/v1'
axios({
url: nrMetricAPI,
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Api-Key': 'LICENSE_KEY'
},
data: JSON.stringify(nrMetrics)
})
.then((response) => {
// Handle the response here if needed
console.log('Metrics data sent successfully:', response.data);
})
.catch((error) => {
// Handle any errors that occur during the request
console.error('Error sending metrics data to New Relic:', error);
})
}

Note: [참고:] 응답에 따라 sessionJSON 를 변경하고 애플리케이션에서 Stripe 측정항목을 가져오는 위치에서 이 함수를 호출하세요.

sendDataToNewRelic (session)

Stripe 모니터링 대시보드 설치

애플리케이션 지표를 모니터링하기 위해 사전 구축된 Stripe 대시보드를 설정하려면 Stripe 대시보드 설치 로 이동하여 지침을 따르십시오. 설치되면 대시보드에 측정항목이 표시됩니다.

다음은 뭐지?

NRQL을 사용하여 Stripe 앱 데이터를 쿼리하세요. 예를 들어 Stripe에서 얻은 순수익을 보려면 쿼리 찾기에서 다음 쿼리를 시도해보세요.

SELECT stripe.amount_total FROM Metric WHERE metricName = 'stripe_metrics'

NRQL 쿼리 작성 및 대시보드 생성에 대해 자세히 알아보려면 다음 문서를 확인하세요.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.