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

Feature request: Add support for server metadata in RollbarAppender XML configuration #309

Open
Satislikev opened this issue Jan 12, 2024 · 0 comments
Labels

Comments

@Satislikev
Copy link

Satislikev commented Jan 12, 2024

Currently adding server metadata is only possible using java configuration example:

new ConfigBuilder.withAccessToken(accessToken)
                .environment(hostConfiguration.getEnvironment())
                .handleUncaughtErrors(true)
                .truncateLargePayloads(true)
                .language("java")
                .framework("spring")
                .server(() -> new Server.Builder()
                        .host(hostConfiguration.getHostId().getValue())
                        .metadata(Map.of(
                                "world", hostConfiguration.getWorld(),
                                "accountId", hostConfiguration.getAccountId()))
                        .build())
                .codeVersion(gitProperties.getShortCommitId())
                .build();

It would be nice if it was possible to add the server metadata from XML configuration in RollbarAppender for logback.

<appender name="rollbar-sync" class="com.rollbar.logback.RollbarAppender">
    <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
        <level>${rollbar.level}</level>
    </filter>
    <accessToken>${rollbar.api-key}</accessToken>
    <codeVersion>@git.commit.id@</codeVersion>
    <enabled>${rollbar.enabled}</enabled>
    <environment>${environment}</environment>
    <framework>spring-boot</framework>
    <language>java</language>
    <server>
        <host>${host-id}</host>
        <metadata>
            <account>${accountId}</account>
            <wrold>${world}</wrold>
        </metadata>
    </server>
</appender>
@linear linear bot added the java label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant