# Apm-rum-angular - how to turn on session when we do ApmService.init()

**URL:** <https://discuss.elastic.co/t/apm-rum-angular-how-to-turn-on-session-when-we-do-apmservice-init/278588>\
**Category:** APM\
**Tags:** rum\
**Created:** [July 13, 2021, 6:12pm UTC](https://discuss.elastic.co/t/apm-rum-angular-how-to-turn-on-session-when-we-do-apmservice-init/278588 "2021-07-13T18:12:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![YanW](https://avatars.discourse-cdn.com/v4/letter/y/a88e57/32.png) [@YanW](https://discuss.elastic.co/u/YanW)\
**Post date:** [July 13, 2021, 6:12pm UTC](https://discuss.elastic.co/t/apm-rum-angular-how-to-turn-on-session-when-we-do-apmservice-init/278588/1 "2021-07-13T18:12:07Z")

</div>

I'm using the latest elastic/apm-rum-angular": "^2.1.0" with Angular 10 and seems I can't turn on the session.  
In the AgentConfigOptions, I don't see the session option, although I see this session is implemented in core and by default it's off

> <https://github.com/elastic/apm-agent-rum-js/pull/1005/files>
>
> This PR adds the session information to transactions. Part of #634
> 
> Fixes #998…
> 
> Todo:
> \- \[x\] Add more tests

```auto
export declare class ApmService {
    apm: ApmBase;
    private router;
    private readonly ngZone;
    constructor(apm: ApmBase, router: Router, ngZone: NgZone);
    init(config: AgentConfigOptions): ApmBase;
    observe(): void;
}

declare module '@elastic/apm-rum' {
  export interface AgentConfigOptions {
    apiVersion?: 2 | 3
    serviceName?: string
    serverUrl?: string
    serviceVersion?: string
    active?: boolean
    instrument?: boolean
    disableInstrumentations?: Array<InstrumentationTypes>
    environment?: string
    logLevel?: LogLevel
    breakdownMetrics?: boolean
    flushInterval?: number
    pageLoadTraceId?: string
    pageLoadSampled?: boolean
    pageLoadSpanId?: string
    pageLoadTransactionName?: string
    distributedTracing?: boolean
    distributedTracingOrigins?: Array<string | RegExp>
    errorThrottleLimit?: number
    errorThrottleInterval?: number
    transactionThrottleLimit?: number
    transactionThrottleInterval?: number
    transactionSampleRate?: number
    centralConfig?: boolean
    ignoreTransactions?: Array<string | RegExp>
    propagateTracestate?: boolean
    eventsLimit?: number
    queueLimit?: number
  }

```

---

<div class="post-metadata">

**Author:** ![vigneshshanmugam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vigneshshanmugam/32/40324_2.png) [@vigneshshanmugam](https://discuss.elastic.co/u/vigneshshanmugam)\
**Post date:** [July 15, 2021, 3:31pm UTC](https://discuss.elastic.co/t/apm-rum-angular-how-to-turn-on-session-when-we-do-apmservice-init/278588/2 "2021-07-15T15:31:19Z")

</div>

Hi @YanW ,

The Session feature is only experimental and we are in the testing phase on figuring out the proper session window and load testing how we can scale that feature which is why we have not talked about it much or added any documentation on that configuration.

I would encourage you to wait until we have proper documentation and provide out of the box session instrumentation.

Thanks,  
Vignesh

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 5, 2021, 11:32am UTC](https://discuss.elastic.co/t/apm-rum-angular-how-to-turn-on-session-when-we-do-apmservice-init/278588/3 "2021-08-05T11:32:04Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
