# How to setup Tag History in a Gateway centric module?

**URL:** <https://forum.inductiveautomation.com/t/how-to-setup-tag-history-in-a-gateway-centric-module/43304>\
**Category:** Module Development\
**Created:** [February 11, 2021, 3:13pm UTC](https://forum.inductiveautomation.com/t/how-to-setup-tag-history-in-a-gateway-centric-module/43304 "2021-02-11T15:13:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cboin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@cboin](https://forum.inductiveautomation.com/u/cboin)\
**Post date:** [February 11, 2021, 3:13pm UTC](https://forum.inductiveautomation.com/t/how-to-setup-tag-history-in-a-gateway-centric-module/43304/1 "2021-02-11T15:13:15Z")

</div>

I am looking at developing my own OEE system for autonomous vehicles.

I have come up with a tag architecture for my module, but would like to store historical data on these tags. Is this something I can configure automatically upon startup of my module… or is it something I would have to do manually through the Ignition gateway settings webpage?

I was trying to find some detailed Tag history examples using the SDK, but I failed.

---

<div class="post-metadata">

**Author:** ![cody.tamaki](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@cody.tamaki](https://forum.inductiveautomation.com/u/cody.tamaki)\
**Post date:** [February 15, 2021, 3:26pm UTC](https://forum.inductiveautomation.com/t/how-to-setup-tag-history-in-a-gateway-centric-module/43304/2 "2021-02-15T15:26:01Z")

</div>

If you’re using the ManagedTagProvider and would like tags you generate to store history you’ll need to add the historian dependencies to your maven project.

```
    <dependency>
        <groupId>com.inductiveautomation.ignition</groupId>
        <artifactId>tag-historian</artifactId>
        <version>4.1.0</version>
        <scope>provided</scope>
    </dependency>

```

Then you can configure historical properties on your tag like this:

```
    BasicBoundPropertySet props = new BasicBoundPropertySet();
    props.set(WellKnownTagProps.HistoryProvider, "HistorianProvider");
    props.set(TagHistoryProps.HistorySampleRate, 1000);
    provider.configureTag(tagPath, props);
```

---

<div class="post-metadata">

**Author:** ![cboin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@cboin](https://forum.inductiveautomation.com/u/cboin)\
**Post date:** [February 17, 2021, 1:23pm UTC](https://forum.inductiveautomation.com/t/how-to-setup-tag-history-in-a-gateway-centric-module/43304/3 "2021-02-17T13:23:09Z")

</div>

Thanks for the info Cody. I will try it out!
