Skip to content

Commit

Permalink
minor improves (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
davin111 authored Mar 7, 2023
1 parent c03ee9e commit 9cd4783
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.io.FileOutputStream
import java.util.Properties

plugins {
id("org.springframework.boot") version "3.0.1" apply false
id("org.springframework.boot") version "3.0.3" apply false
id("io.spring.dependency-management") version "1.1.0"
kotlin("jvm") version "1.8.0"
kotlin("plugin.spring") version "1.8.0"
Expand Down
2 changes: 2 additions & 0 deletions truffle-core/src/main/kotlin/TruffleClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class DefaultTruffleClient(
}

override fun sendEvent(ex: Throwable) {
if (truffleApp.phase == "local" || truffleApp.phase == "test") return

events.tryEmit(
TruffleEvent(
app = truffleApp,
Expand Down
2 changes: 1 addition & 1 deletion truffle-core/src/main/kotlin/protocol/TruffleApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package com.wafflestudio.truffle.sdk.core.protocol

data class TruffleApp(
val name: String,
val phase: String? = null,
val phase: String,
)
16 changes: 16 additions & 0 deletions truffle-spring-boot-starter/src/main/kotlin/TruffleProperties.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,23 @@ import org.springframework.boot.context.properties.ConfigurationProperties

@ConfigurationProperties("truffle.client")
data class TruffleProperties(
/**
* Truffle 이 식별하는 애플리케이션의 이름.
*
* 에러 리포트에 사용되며 Truffle 서버에 등록된 이름과 일치하는 정확한 애플리케이션 이름이 사용되어야 합니다.
*/
val name: String,
/**
* 애플리케이션의 환경을 구분하는 이름.
*
* 에러 리포트에 사용되며 `"prod"`, `"dev"`, `"local"` 등이 사용될 수 있습니다.
* `"local"` 또는 `"test"`가 사용되는 경우, Truffle SDK 는 Truffle 서버로 요청을 전송하지 않습니다.
*/
val phase: String,
/**
* Truffle 서버에서 애플리케이션의 요청이 유효한지 검증하는 데에 사용하는 API key.
*
* 외부에 공개되지 않도록 주의해 관리해야 합니다.
*/
val apiKey: String,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
com.wafflestudio.truffle.sdk.TruffleAutoConfiguration

0 comments on commit 9cd4783

Please sign in to comment.