Skip to content

Commit

Permalink
[pinpoint-apm#11531] Add websocket options to web module
Browse files Browse the repository at this point in the history
  • Loading branch information
emeroad committed Sep 26, 2024
1 parent c540794 commit e8d024f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
9 changes: 8 additions & 1 deletion web-starter/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@ pinpoint:
inspector:
enabled: true
realtime:
enabled: true
enabled: true


pinpoint.web.websocket:
async-send-timeout:
max-session-idle-timeout: 10800000 # 3 hours
max-binary-message-buffer-size:
max-text-message-buffer-size:
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
import com.navercorp.pinpoint.web.websocket.PinpointWebSocketHandlerManager;
import com.navercorp.pinpoint.web.websocket.message.PinpointWebSocketMessageConverter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
import org.springframework.web.socket.handler.WebSocketHandlerDecoratorFactory;
import org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean;

import java.util.List;

Expand All @@ -56,6 +58,12 @@ public WebSocketConfigurer webSocketConfigurer(
);
}

@Bean
@ConfigurationProperties(prefix = "pinpoint.web.websocket")
public ServletServerContainerFactoryBean createWebSocketContainer() {
return new ServletServerContainerFactoryBean();
}

@Bean
public AgentService agentService(AgentInfoService agentInfoService) {
return new AgentServiceImpl(agentInfoService);
Expand Down
7 changes: 7 additions & 0 deletions web/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ hbase:

pinpoint.web.cache-resources: true

pinpoint.web.websocket:
async-send-timeout:
max-session-idle-timeout: 10800000 # 3 hours
max-binary-message-buffer-size:
max-text-message-buffer-size:


---
spring.config.activate.on-profile: local
pinpoint.web.cache-resources: false
Expand Down

0 comments on commit e8d024f

Please sign in to comment.